23.09.2011, 16:43
What we do wrong? if I do this command on another play it on me why?
Код:
YCMD:slap(playerid, params[], help) { #pragma unused help if (pInfo[playerid][pAdmin] == 0) return 0; new giveplayerid, Float:value, reason[70]; if (sscanf(params, "rfs[70]", giveplayerid, value, reason)) SendClientMessage(playerid, COLOR_GREEN, "* USAGE: /slap [Nick/ID] [Height] [Reason]"); else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "* Player not fuond!"); else if (value < 1 || value > 100) SendClientMessage(playerid, COLOR_RED, "* Height can't by lower than 1 and bigger than 100!"); else { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid, x, y, z +value); new string[128]; format(string, 128, "['SLAP ]: %s was slapped by Admin %s. Reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason); SendClientMessageToAll(COLOR_RED, string); } return 1; }