11.07.2011, 21:36
Hi i'm still getting to grips with Sscanf and i think i've put the wrong letter because this isn't working. In the black box it says (server.exe) "Format specifier does not meet parameter count."
pawn Код:
command(agiveweapon, playerid, params[])
{
if( PlayerInfo[playerid][Admin] >= 2)
{
new pid;
new wep;
new ammo;
if(sscanf(params, "ud", pid, wep, ammo)) return SendClientMessage(playerid, COLOUR_WHITE, "Hint: /giveweapon [Playerid] [Weaponid] [Ammo]");
if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOUR_WHITE, "That player is not connected.");
if(wep < 0 || wep > 46 ) return SendClientMessage(playerid, COLOUR_WHITE, "Weapon ID has to be between 0 and 46!");
GivePlayerWeapon(pid,wep,ammo);
}
return 1;
}