Forum Jump :

Author Message


Posts: 41
Rank:


Level: Member

Country: us
Location: Miami
Occupation: US Air Force Active Duty
Age: 22
In-game name: SugarBear125

 
#1 Posted at 2017-11-05 06:00        
     
Now, I'm trying to use an Hit eventhandler and have it so when you shoot a player the shooter executes the script instead of the person getting shot. I have it set up below:

player addEventHandler ["Hit", {null = [] execVM"hit.sqf"}];

player addEventHandler ["Hit", {_this execVM"hit.sqf"}];

When I use that second code it was working but the player who got hit heard the sound and not the shooter. I simply just need to flip that so I used:

player addEventHandler ["Hit", {(_this select 0) execVM"hit.sqf"}];

Ive tried all of these to no avail. Inside the script is just a playSound so I use:

player addEventHandler ["Hit", {playSound"hit"}];