06.01.2011, 18:58
OK, So as part of my GM I have a /stun script. However, when you get /stun'ned you do nothing, just stand there, lol.
This is the code:
So I added:
And then the person who does the stunning falls over. LOL.
So I changed 'playerid' to 'NearestPlayer' thinking at that is the variable which defines the bitch that gets tazed. But when doing this, is just makes them stand there, just link before.
Any advice? I want the person who gets tazed to
Cheers.
This is the code:
pawn Код:
if(!IsPlayerInAnyVehicle(NearestPlayer) )
{
TogglePlayerControllable(NearestPlayer, false);
Player[NearestPlayer][Tazed] = 1;
format( string, sizeof( string ), "* %s has stunned %s, with their taser.", UnderscoreToSpaceName( playerid ), UnderscoreToSpaceName(NearestPlayer) );
NearByMessage( playerid, NICESKY, string);
SendClientMessage(NearestPlayer, WHITE, "You have been tased. The effect will last for 12 seconds." );
SetTimerEx( "UntazePlayer", 12000, false, "d", NearestPlayer);
}
else
pawn Код:
ApplyAnimationEx( playerid, "PED", "FLOOR_hit_f", 3.1, 0, 1, 1, 1, 1);// Taze Animation
So I changed 'playerid' to 'NearestPlayer' thinking at that is the variable which defines the bitch that gets tazed. But when doing this, is just makes them stand there, just link before.
Any advice? I want the person who gets tazed to
pawn Код:
ApplyAnimationEx( ???, "PED", "FLOOR_hit_f", 3.1, 0, 1, 1, 1, 1)