Anti spray

Sam201

Well-known member
Joined
Sep 22, 2014
Messages
233
Solutions
1
Reaction score
15
Is it possible to make something that stops player from performing that animation when another player sprays on them with a spray can or a fire extinguisher?

I tried nops but didn't work
 

Sam201

Well-known member
Joined
Sep 22, 2014
Messages
233
Solutions
1
Reaction score
15
Can I edit weapon.dat and set their values to 0 so that no one can give damage to me using spray cans etc..?
 

Safa

Well-known member
Joined
Feb 24, 2015
Messages
342
Reaction score
127
You can use CLEO for the no-damage.

Actor.Immunities($PLAYER_ACTOR, 0, 0, 0, 0, 1) (not sure if the last param was for Melee, but you can set Melee-Damage to 0. That should work. Check documentation for the exact parameters.
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,104
Solutions
5
Reaction score
882
Location
Lithuania
1. 02AB: set_actor $PLAYER_ACTOR immunities BP 0 FP 0 EP 0 CP 0 MP 1
Like Safa sad probably last param should be 1
2. Get anim name then if anim == your anim , then reset / stop anim
 

Sam201

Well-known member
Joined
Sep 22, 2014
Messages
233
Solutions
1
Reaction score
15
I have tried to compile it but it gave some error can someone do it for me?

The anim names is : gas_cwr and IDLE_tired
 
Last edited:

Sam201

Well-known member
Joined
Sep 22, 2014
Messages
233
Solutions
1
Reaction score
15
{$CLEO}

-

31@ = 0

:1
wait 0
if
0ADC: "LOLL"
then
if
31@ == 0
then
31@ = 1
print "ON" 2000
else
31@ = 0
print "OFF" 2000
02AB: set_actor $PLAYER_ACTOR immunities BP 0 FP 0 EP 0 CP 0 MP 0
end
end
jump @2

:2
wait 0
if
31@ == 1
then
0B2B: samp 1@ = get_player_id_by_actor_handle $PLAYER_ACTOR
0B57: samp 2@ = player 1@ animation_id

if
0818: actor $PLAYER_ACTOR in_air
then
02AB: set_actor $PLAYER_ACTOR immunities BP 0 FP 0 EP 0 CP 0 MP 1
else
if or
0039: 2@ == 1133
0039: 2@ == 1129
0039: 2@ == 1208
then
0AFD: samp set_special_action 8
0AFD: samp set_special_action 0
end
02AB: set_actor $PLAYER_ACTOR immunities BP 0 FP 0 EP 0 CP 0 MP 0
end

end
jump @1


this what i tried doesnt work at all someone make one for me please
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,104
Solutions
5
Reaction score
882
Location
Lithuania
Stop any anim.:
0605: actor $PLAYER_ACTOR perform_animation_sequence "ParkSit_W_loop" IFP_file "BEACH" 4.0 loop 0 0 0 0 time 1
 

Sam201

Well-known member
Joined
Sep 22, 2014
Messages
233
Solutions
1
Reaction score
15
I feel ashamed, I can't get it to work
 
Top