animation check
#1

How to check if player is using animation BOMBER.

(if .......)

Awarding anyone who can help with +rep.
Reply
#2

https://sampwiki.blast.hk/wiki/GetPlayerAnimationIndex
Reply
#3

... 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.
Reply
#4

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;
}
Reply
#5

ty +rep.
Reply
#6

1 error about targetid. error 017: undefined symbol "targetid"
Reply
#7

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;
}
Reply
#8

aa ofc, it has Iplayer not targetid. Works ty.
Reply
#9

Np
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)