[HELP]how to make a dcmd command with multiples parameters?
#3

example PM dcmd.
pawn Код:
dcmd_pm(playerid, params[])
{
 new otherid, result[256], string[256];
 if(sscanf(params, "us", otherid, result) SendClientMessage(playerid, RED, "Usage: /PM [ID] [MSG]");
 // The "us" part is the format of the input. u is for username or playerid and s is for string which is the message.
 else
 {
   format(string, sizeof(string), "PM(%d): %s", playerid, result);
   SendClientMessage(otherid, YELLOW, string);
 }
 return 1;
}
Reply


Messages In This Thread
[HELP]how to make a dcmd command with multiples parameters? - by mr.b - 10.09.2009, 04:51
Re: [HELP]how to make a dcmd command with multiples parameters? - by Correlli - 10.09.2009, 05:14
Re: [HELP]how to make a dcmd command with multiples parameters? - by dougbrowne - 10.09.2009, 05:36
Re: [HELP]how to make a dcmd command with multiples parameters? - by Sergei - 10.09.2009, 05:56

Forum Jump:


Users browsing this thread: 1 Guest(s)