SA-MP Forums Archive
CMD /dance - 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: CMD /dance (/showthread.php?tid=355676)



CMD /dance - thefatshizms - 30.06.2012

Hello, im very good with commands and good with sscanf but got a problem i want to make a command /dance <1-4> but unsure of doing it.


Re: CMD /dance - WagnerPM - 30.06.2012

pawn Код:
CMD:dance(playerid, params[])
{
    new dance;
    if(sscanf(params, "d", dance))
        return SendClientMessage(playerid, -1, "* USE: /dance [1-4]");
    if(dance == 1) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1); }
    else if(dance == 2) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2); }
    else if(dance == 3) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3); }
    else if(dance == 4) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4); }
    else { SendClientMessage(playerid, -1, "* USE: /dance [1-4]"); return 1; }
    return 1;
}



Re: CMD /dance - thefatshizms - 30.06.2012

thanks