17.03.2016, 17:22
Код:
forward PrisonTimer(); public PrisonTimer() { foreach(Player, playerid) { new string[128]; if(Player[playerid][pPrisonTime] <=0) { if(Player[playerid][pPrison] == 1) // NG Prison { Player[playerid][pPrison] = 0; Player[playerid][pPrisonTime] = 0; SetPlayerInterior(playerid, 0); SetPlayerFacingAngle(playerid, 87.1763); SetPlayerColor(playerid, TRANSPARENT_WHITE); SetPlayerPos(playerid, 1546.1428,-1675.4786,13.5617); SetCameraBehindPlayer(playerid); SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have served your prison time, try to be a better citizen."); format(string, sizeof(string), "Prison: %s has been released as they served their prison time.", GetName(playerid)); foreach(Player, i) { if(IsACop(i) && IsFBI(i) && IsDOC(i)) { SendClientMessage(i, COLOR_BLUE, string); } } } else if(Player[playerid][pPrison] == 2) // Admin Prison { Player[playerid][pPrison] = 0; Player[playerid][pPrisonTime] = 0; format(Player[playerid][pPrisonReason], 64, ""); format(Player[playerid][pPrisonBy], 32, ""); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetPlayerFacingAngle(playerid, 87.1763); SetPlayerColor(playerid, TRANSPARENT_WHITE); SetPlayerPos(playerid, 1546.1428,-1675.4786,13.5617); SetCameraBehindPlayer(playerid); SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have served your prison time, try to be a better player."); } } else { if(!IsAFK[playerid]) { Player[playerid][pPrisonTime] --; format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n~~n~~r~Prison Time Left: ~w~%d ~r~seconds", Player[playerid][pPrisonTime]); GameTextForPlayer(playerid, string,1500, 3); } } } return 1; }
Where?