27.08.2011, 20:00
Quote:
Hello,
In my console I'm getting this message when I'm doing some commands: Код:
sscanf warning: Format specifier does not match parameter count pawn Код:
|
PHP код:
CMD:slap(playerid, params[])
{
if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,"You aren't admin.");
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /slap [PlayerID]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Player not connected");
new Float:SLX, Float:SLY, Float:SLZ;
GetPlayerPos(targetid, SLX, SLY, SLZ);
SetPlayerPos(targetid, SLX, SLY, SLZ+5);
PlayerPlaySound(targetid, 1130, SLX, SLY, SLZ+5);
new string[128];
new pName[24], pTame[24];
GetPlayerName(playerid,pName,24);
GetPlayerName(targetid,pTame,24);
format(string,sizeof string,""#COL_ORANGE"%s has been slapped by Administrator %s.",pTame,pName);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}