26.05.2015, 10:34
Код:
CMD:escape(playerid, params[]) { if(GetTeam{playerid} != CLASS_CIV) return SendClientMessage(playerid, RED, "Only civilians can use this command."); if(IsJailed{playerid} == false) return SendClientMessage(playerid, RED, "Your not in jail."); //if(CanESC{playerid} == false) return SendClientMessage(playerid, RED, "Plsease wait before trying to escape jail again.");// new escrand = random(5); switch(escrand) { case 0: { SetPlayerHealth(playerid, 100.0); SetPlayerInterior(playerid, 3); SetPlayerPos(playerid, 200.6972, 168.2653, 1003.0234); SetPlayerFacingAngle(playerid, 89.0391); SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 6); PlayerInfo[playerid][pCrimes] ++; format(fstr, sizeof(fstr),"[DISPATCH]: Suspect %s [%d] has just escaped jail at LVPD.", GetName(playerid), playerid); CopRadio(BLUE, fstr); SendClientMessage(playerid, LIGHTGREEN, "You have escaped jail!"); format(fstr2, sizeof(fstr2), "%s [%d] has just escaped jail at LVPD.", GetName(playerid), playerid); SendClientMessageToAll(RED, fstr2); SendClientMessage(playerid, RED, "County jail escape. [WANTED LEVEL INCREASED]"); IsJailed{playerid} = false; KillTimer(JailTimer[playerid]); JailTime[playerid] = 0; PlayerInfo[playerid][jTime] = 0; if(IsPlayerConnected(playerid) && IsLoggedIn{playerid} == 1) { SaveUserStats(playerid); } } } return true; }