Jump to content

How to check which weapon was fired from (OnPlayerWeaponShot)?


Recommended Posts

Posted (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 by Kopra
Posted
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"

Posted

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.

  • Like 1
Posted
В 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...