22.06.2013, 15:47
You must have put them in the wrong order. Try this:
pawn Код:
CMD:wslap(playerid,params[])
{
if(pInfo[playerid][pAdminLevel] >= 1)
{
new targetid,string[256], reason[60];
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid,-1,""chat" /wslap [playerid]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
if(strlen(reason) > 60 || strlen(reason) < 2) return SendClientMessage(playerid, -1, ""chat" Reason must be between 2 and 60 characters");
new Float:posxx[3];
GetPlayerPos(targetid, posxx[0], posxx[1], posxx[2]);
SetPlayerPos(targetid, posxx[0], posxx[1], posxx[2]+4);
format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has warned slapped %s - Reason: %s",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid), reason);
SendClientMessageToAll(-1,string);
}
else {
SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
}
return 1;
}