How To >>>
#6

pawn Код:
//Easy function for commands.
stock SCP(_id, _param[], _command[] = "")
{
    format(iStr, sizeof(iStr), "{6a696a}[Command]: /%s {9c9a9c}%s", _command, _param); //If you type /dance and enter, it will return like that message.
    return SendMessageToPlayer(_id, COLOR_LIGHTGREY, iStr, 128); //Messages colors
}

COMMAND:dance(playerid, params[]) //Command, you require zcmd includes for this.
{
    new id;
    if(sscanf(params, "d", id)) return SCP(playerid, "[1-4]"); //You have to choice the number of Dance Styles.
    switch(id)
    {
        case 1: SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1); //Dance Styles 1
        case 2: SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2); //Dance Styles 2
        case 3: SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3); //Dance Styles 3
        case 4: SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4); //Dance Styles 4
        default: SCP(playerid, "[1-4]"); //If you put the wrong action for dance, example "/dance 5" and it will be return to "[Commands]: /dance [1-4]"
    }
    return 1;
}
Reply


Messages In This Thread
How To >>> - by Seaf - 13.11.2014, 08:54
Re: How To >>> - by Banana_Ghost - 13.11.2014, 08:59
Re: How To >>> - by Seaf - 13.11.2014, 09:16
Re: How To >>> - by ZaBraNjeNi - 13.11.2014, 16:17
Re: How To >>> - by CoaPsyFactor - 13.11.2014, 18:50
Re: How To >>> - by AzaMx - 16.11.2014, 10:25

Forum Jump:


Users browsing this thread: 1 Guest(s)