Chainsaw Animation - 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: Chainsaw Animation (
/showthread.php?tid=381105)
Chainsaw Animation -
[rG]Cold - 28.09.2012
How do i check if a player is using a chainsaw?
Re: Chainsaw Animation -
stabker - 28.09.2012
Sorry for my bad English
So, you must put into OnPlayerUpdate this code:
pawn Код:
new test[30];
format(test, sizeof test,"Animid: %d",GetPlayerAnimationIndex(playerid));
SendClientMessage(playerid,-1,test);
Then do some action with a chainsaw in the game and remember the IDs of animations from the chat.
Remove code from OnPlayerUpdate & use this to check chainsaw animation:
pawn Код:
switch(GetPlayerAnimationIndex(playerid))
{
case (here ids): SendClientMessage(playerid,-1,"Chainsaw Animation");
}
Re: Chainsaw Animation -
Mr.Anonymous - 28.09.2012
Or you can detect if a player is using a chainsaw.
Re: Chainsaw Animation -
[rG]Cold - 28.09.2012
Quote:
Originally Posted by stabker
Sorry for my bad English
So, you must put into OnPlayerUpdate this code:
pawn Код:
new test[30]; format(test, sizeof test,"Animid: %d",GetPlayerAnimationIndex(playerid)); SendClientMessage(playerid,-1,test);
Then do some action with a chainsaw in the game and remember the IDs of animations from the chat.
Remove code from OnPlayerUpdate & use this to check chainsaw animation:
pawn Код:
switch(GetPlayerAnimationIndex(playerid)) { case (here ids): SendClientMessage(playerid,-1,"Chainsaw Animation"); }
|
Ok thanks alot for this. I checked something in wiki but my internet crashed.