sscanf warning: format specifier does not match parameter count. |
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;
}
new newtext[41];
format(newtext, sizeof(newtext), "Level:%d", PlayerLevel[playerid]);
TextDrawSetString(himessage, newtext);
TextDrawShowForPlayer(playerid, himessage);
if(sscanf(params, "u", ID))
if(sscanf(params, "u", ID))
COMMAND:adpil(playerid, params[]) {
new
string[128],
id,
plname[MAX_PLAYER_NAME],
newtext[41];
GetPlayerName(id, plname, sizeof(plname));
if(AdminLevel[playerid] != 1337) return 0;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "USAGE: adpil [playerid]");
if(!IsPlayerConnected(id)) return 0;
if(PlayerLevel[id] == 200) return SendClientMessage(playerid, -1, "Player is already pilot");
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);
format(string, sizeof(string), "Level:%d", PlayerLevel[playerid]);
TextDrawSetString(himessage, string);
TextDrawShowForPlayer(playerid, himessage);
return 1;
}