22.09.2014, 15:57
Ok so i made cuff command
But i get this
Код:
CMD:cuff(playerid,params[]) { new targetid; if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "USAGE: /cuff [Part of Name/Player ID]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFF,"{ff0000}ERROR: That Player Is Not Connected!"); if(playerid == 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't cuff yourself!"); if(!IsPlayerPolice(target)) return SendClientMessage(playerid, -1, "{ff0000}ERROR: Only cops can use this command!"); { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x,y,z); if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z)) { new str[512]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name,sizeof(name)); new target[MAX_PLAYER_NAME]; GetPlayerName(targetid, target, sizeof(target)); format(str, sizeof(str), "{ff0000}You cuffed %s!",target); SendClientMessage(playerid, 0xE01B1B, str); SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000); SetPlayerSpecialAction(targetid,SPECIAL_ACTION_CUFFED); return 1; } } return 0; }
pawn Код:
error 017: undefined symbol "IsPlayerPolice"