09.10.2012, 21:30
Hello!
What's wrong here? When I use the command I get the sscanf usage message.Thx!
What's wrong here? When I use the command I get the sscanf usage message.Thx!
PHP код:
CMD:adminchat(playerid, params[])
{
if(GetPVarInt(playerid, "AdminLevel") < 1)
return SendClientMessage( playerid, -1, "You must be an "AdminLevel1" to use this command!");
new paramss[83];
if(!sscanf(params, "s[81]", paramss)) return SendClientMessage(playerid, -1, "Usage: /(a)dminchat [text]");
new szMessage[128];
format(szMessage, sizeof(szMessage), ""ORANGESV"Admin {FFFFFF}%s"ORANGESV": %s", pName(playerid), paramss);
foreach(Player, i)
{
if(IsPlayerConnected(i) && GetPVarInt(i, "AdminLevel") >= 1)
{
SendClientMessage(i, COLOR_WHITE, szMessage);
}
}
return 1;
}