animation check - 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: animation check (
/showthread.php?tid=468431)
animation check -
xdarren - 08.10.2013
How to check if player is using animation BOMBER.
(if .......)
Awarding anyone who can help with +rep.
Re: animation check -
Rapgangsta - 08.10.2013
https://sampwiki.blast.hk/wiki/GetPlayerAnimationIndex
Re: animation check -
xdarren - 08.10.2013
... Lets say I have the command cuff. Now I want the cuff to check if player has /handsup and if he has /handsup then you can cuff him.
Re: animation check -
EiresJason - 08.10.2013
pawn Код:
new bool:HandsAreUp[MAX_PLAYERS];
CMD:handsup(playerid, params[])
{
//do the animation
HandsAreUp[playerid] = true;
return 1;
}
CMD:cuff(playerid,params[])
{
//sscanf code.
if(!HandsAreUp[targetid]) SendClientMessage(playerid,-1,"ERROR: That person's hands are not up!");
//cuff animation code - setting objects etc.
return 1;
}
Re: animation check -
xdarren - 08.10.2013
ty +rep.
Re: animation check -
xdarren - 08.10.2013
1 error about targetid. error 017: undefined symbol "targetid"
Re: animation check -
EiresJason - 08.10.2013
Your code should have 'sscanf' in it for CMD:cuff.
pawn Код:
new bool:HandsAreUp[MAX_PLAYERS];
CMD:handsup(playerid, params[])
{
//do the animation
HandsAreUp[playerid] = true;
return 1;
}
CMD:cuff(playerid,params[])
{
new targetid;
if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,-1,"USAGE: /cuff [PlayerId/PartOfName]");
if(!HandsAreUp[targetid]) SendClientMessage(playerid,-1,"ERROR: That person's hands are not up!");
//cuff animation code - setting objects etc.
return 1;
}
Re: animation check -
xdarren - 08.10.2013
aa ofc, it has Iplayer not targetid. Works ty.
Re: animation check -
EiresJason - 08.10.2013
Np