19.09.2015, 10:36
Код:
warning 211: possibly unintended assignment
Код:
CMD:arrest(playerid, params[]) { for(new i = 0; i < MAX_PLAYERS; i++) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER || GetPlayerState(i) == PLAYER_STATE_PASSENGER) { SendClientMessage(playerid,-1,"You cannot arrest a suspect they are in a vehicle. Get them to exit the vehicle first."); return 1; } new string[128]; if(GetPlayerClass[playerid] == COP_CLASS || GetPlayerClass[playerid] == ARMY_CLASS) { if(GetPlayerWantedLevel(i) >= 3) { if(Cuffed[i] = 1) { if(sscanf(params,"ud", i)) return SendClientMessage(playerid, -1,"USAGE: /arrest [player id]"); GivePlayerMoney(playerid, 3000); SetPlayerScore(playerid, GetPlayerScore(playerid)+1); Jailed[i] = 1; JailTime[i] = 60; Cuffed[i] = 0; SetPlayerSpecialAction(i, 0); RemovePlayerAttachedObject(i, i); SetPlayerVirtualWorld(i, 10); SetPlayerFacingAngle(i, 360.0); SetPlayerInterior(i, 3); SetPlayerPos(i, 197.5662, 175.4800, 1004.0); SetPlayerWantedLevel(i, 0); SetPlayerHealth(i,99999); ResetPlayerWeapons(i); format(string,sizeof(string),"Police Officer %s(%d) Has arrested wanted suspect %s(%d).",GetNamee(playerid),playerid,GetNamee(i),i); SendClientMessageToAll(COLOR_ORANGE,string); return 1; } else { SendClientMessage(playerid, -1, "You Can't Cuff Innocents!"); } } } } return 1; }
Код:
line: if(Cuffed[i] = 1)