CMD /dance
#1

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

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

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)