Sasha_Interesnyy Posted April 18, 2022 Posted April 18, 2022 As a test method, I learned that shots from airplanes / helicopters are also considered, I need to forbid shooting from any weapons other than hand weapons (pistols, etc.)
Kopra Posted April 18, 2022 Posted April 18, 2022 (edited) You will need a list of unallowed weapons, then check if players current weapon is included in that list, if yes, cancel the event if you are using C#. There is also another approach, you can use disableControllAction combined with allowed weapon list to disable firing.RAGE Multiplayer Wiki Use wiki to find needed funcitons. Edited April 18, 2022 by Kopra
Sasha_Interesnyy Posted April 18, 2022 Author Posted April 18, 2022 2 минуты назад, Kopra сказал: You will need a list of unallowed weapons, then check if players current weapon is included in that list, if yes, cancel the event if you are using C#. There is also another approach, you can use disableControllAction combined with allowed weapon list to disable firing. So I need to get a variable that contains "What the player shot from"
Kopra Posted April 19, 2022 Posted April 19, 2022 You need to get players current weapon at the time of shooting.
Sasha_Interesnyy Posted April 19, 2022 Author Posted April 19, 2022 46 минут назад, Kopra сказал: You need to get players current weapon at the time of shooting. Okay, I got it. How can I cancel an event? CancelEventArgs.Cancel = true doesn't work.
Kopra Posted April 20, 2022 Posted April 20, 2022 Then maybe that event is not cancelable, I am not sure about that, maybe its easier then to use Tick event in combination with DisableControlAction and weapon check to don't let player even start shooting, maybe it's too late when event is called. 1
Sasha_Interesnyy Posted April 21, 2022 Author Posted April 21, 2022 В 20.04.2022 в 12:58, Kopra сказал: Then maybe that event is not cancelable, I am not sure about that, maybe its easier then to use Tick event in combination with DisableControlAction and weapon check to don't let player even start shooting, maybe it's too late when event is called. I already got this same answer on another forum. But thanks anyway
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now