Quote:
Originally Posted by Jefff
pawn Код:
public JailPlayer(playerid) { KillTimer(JailTimer[playerid]); TogglePlayerControllable(playerid, 1); SetPlayerPos(playerid, 197.6661, 173.8179, 1003.0234); SetPlayerInterior(playerid, 3); SetCameraBehindPlayer(playerid); JailTimer[playerid] = SetTimerEx("JailRelease", 1000, true, "d", playerid); PlayerInfo[playerid][pAJailed] = 1; }
public OnPlayerSpawn(playerid) { if(PlayerInfo[playerid][pJailed] == 1) { KillTimer(JailTimer[playerid]); SetPlayerPos(playerid, 197.6661, 173.8179, 1003.0234); SetPlayerInterior(playerid, 3); SetCameraBehindPlayer(playerid); SendClientMessage(playerid, COLOR_GREY, "[JAIL] You have not served your time yet!"); SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); ResetPlayerWeapons(playerid); GameTextForPlayer(playerid, "~r~Back To Jail", 2500, 0); JailTimer[playerid] = SetTimerEx("JailRelease", 1000, true, "d", playerid); } else { SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); SetPlayerPos(playerid, 1685.8979/*X*/, -2330.5691/*Y*/, -2.6797/*Z*/); SetPlayerFacingAngle(playerid, 360.0); } return 1; }
|
pawn Код:
JailTimer[playerid] = SetTimerEx("JailRelease", 1000, true, "d", playerid);
Why did you set it on "repeat"?
And how does it save?
Can you at least give me some information so I can learn something from it?