SA-MP Forums Archive
Taser - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Taser (/showthread.php?tid=443989)



Taser - danites - 14.06.2013

http://pastebin.com/3qpXJuee

can you help me with this script about taser, in this script when i tase someone he falls down, but as soon as he writes /dance [1-4] and hits enter he can move again. So my question is can someone change it so when i tase a person he falls down and get up after 1-2 seconds but can't move in any way, He can't G to get in car nor F to drive it.


Re: Taser - S0n1COwnsYou - 14.06.2013

PHP Code:
//AFTER YOUR INCLUDES
new PlayerTazed[MAX_PLYAERS] = 0;
//INSIDE YOUR TAZE FUNCTION
PlayerTazed[damagedid] = 1;
//INSIDE YOUR DANCE COMMAND
if(PlayerTazed[playerid] == 0)
{
    
//YOUR CODE
}
else 
SendClientMessage(playerid,-1,"error you are tazed"); 



Re: Taser - Riddick94 - 14.06.2013

Quote:
Originally Posted by S0n1COwnsYou
View Post
PHP Code:
//AFTER YOUR INCLUDES
new PlayerTazed[MAX_PLYAERS] = 0;
//INSIDE YOUR TAZE FUNCTION
PlayerTazed[damagedid] = 1;
//INSIDE YOUR DANCE COMMAND
if(PlayerTazed[playerid] == 0)
{
    
//YOUR CODE
}
else 
SendClientMessage(playerid,-1,"error you are tazed"); 
Wouldn't it be betted to put this shitty shit inside command callback to prevent using all the commands? And why I am saying, that is a shitty shit.. because, I can use animation check, you will use less memory then.


Re: Taser - S0n1COwnsYou - 14.06.2013

i just tried to help him as fast as possible , don't offend just reply polity and fix my code.


Re: Taser - danites - 14.06.2013

Hmm dude im a begginer ,can you write me better where to put

PlayerTazed[damagedid] = 1; ,just say me under which line i need to add this in command function ,thanks i send you pastebin so you can replay