01.11.2013, 20:45
Hello !
Well, here is my command:
So the problem is, whatever id i type, the message is still send that the player has been slapped. It should send that the player is invalid...
Well, here is my command:
pawn Код:
CMD:slap(playerid, params[])
{
new targetid; new string[150]; new Float: x, Float: y, Float: z;
if(sscanf(params, "u", targetid))return SendClientMessage(playerid, GREY, "[USAGE]: /slap {FF0000}[PlayerID]");
if(targetid == INVALID_PLAYER_ID)return SendClientMessage(playerid, RED, "[SERVER]: {FFFFFF}This player is {FF0000}NOT {FFFFFF}valid !");
format(string, sizeof(string), "{FFFFFF}[SERVER]: {800080}%s(ID:%d) {FFFFFF}has been slapped by {800080}%s(ID:%d) {FFFFFF}!", GetName(targetid), targetid, GetName(playerid), playerid);
SendClientMessageToAll(PURPLE, string);
GetPlayerPos(targetid, x, y, z);
SetPlayerPos(targetid, x, y, z +10);
return 1;
}