Example of command with params? (newbie)
#4

pawn Код:
YCMD:stunt(playerid, params[], help)
{
    if(help)
    {
        SendClientMessage(playerid, -1, "Help text goes here for /help stunt 1");
        return 1;
    }
    if(strcmp(params, "1", true) == 0)
    {
        SetPlayerPos(playerid,X,Y,Z);
    }
    else if(strcmp(params, "2", true) == 0)
    {
        SetPlayerPos(playerid,X,Y,Z);
    }
    else
    {
        SendClientMessage(playerid, -1, "Unknown parameter");
    }
    return 1;
}
Reply


Messages In This Thread
Example of command with params? (newbie) - by TheBetaFox - 11.08.2011, 11:05
Re: Example of command with params? (newbie) - by Darnell - 11.08.2011, 11:29
Re: Example of command with params? (newbie) - by TheBetaFox - 11.08.2011, 14:33
Re: Example of command with params? (newbie) - by MadeMan - 11.08.2011, 15:31
Re: Example of command with params? (newbie) - by TheBetaFox - 11.08.2011, 15:43

Forum Jump:


Users browsing this thread: 1 Guest(s)