17.10.2011, 12:46
i have a command that working and everything ok
but the problem is that every time when i use the command
the console write me
the command.
the problem start when i put that i command
but the problem is that every time when i use the command
the console write me
Quote:
sscanf warning: format specifier does not match parameter count. |
PHP код:
command(adpil, playerid, params[])
{
if(AdminLevel[playerid] == 1337)
{
new string[128];
new ID;
if(sscanf(params, "ui", ID))
{
SendClientMessage(playerid, Red, "Usage: /adpil (PlayerID)");
return 1;
}
if(!IsPlayerConnected(ID))
{
SendClientMessage(playerid, Red, "That player ID is not connected.");
return 1;
}
if(PlayerLevel[ID] > 200)
{
SendClientMessage(playerid, Green, "That player is already a pilot or higher.");
return 1;
}
new pname[128];
GetPlayerName(ID, pname, sizeof(pname));
format(string, sizeof(string), "Server Admin has made player %s a War Pilot.", pname);
SendClientMessageToAll(Blue, string);
SendClientMessage(ID, Blue, "Server Admin has given you Pilot Status. You can now fly the Rustlers,
IRC_Say(gGroupID, IRC_CHANNEL, string);
PlayerLevel[ID] =200;
TextDrawHideForPlayer(playerid, himessage);
new newtext[41];
format(string, sizeof(string), "Level:%d", PlayerLevel[playerid]);
TextDrawSetString(himessage, string);
TextDrawShowForPlayer(playerid, himessage);
return 1;
}
SendClientMessage(playerid, Red, "Invalid Command");
return 1;
}
PHP код:
new newtext[41];
format(newtext, sizeof(newtext), "Level:%d", PlayerLevel[playerid]);
TextDrawSetString(himessage, newtext);
TextDrawShowForPlayer(playerid, himessage);