04.11.2010, 21:35
I am working a little more on my "Clean Script" and I wanted to change some commands around to perform a little faster and more efficiently. I have the following command:
Is there a way I could send 2 messages when a player has incorrect parameters for sscanf? Sort of like this, but doing it the way I have it above...?
pawn Код:
CMD:set(playerid, params[])
{
if(PlayerStats[playerid][pAdminLevel] < 3)
return SendClientMessage(playerid, COLOR_SYSTEM, ACMD_ERROR);
if(sscanf(params, "uis[15]", id, value, usage))
return SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /aset [playerid] [value] [usage]");
return 1;
}
pawn Код:
if(sscanf(params, "uis[15]", id, value, usage))
{
SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /aset [playerid] [value] [usage]");
SendClientMessage(playerid, COLOR_WHITE, "Usage List: skin, score, adminlevel, color");
}