07.05.2014, 21:33
https://sampforum.blast.hk/showthread.php?tid=511491
+
http://forum.sa-mp.com/showpost.php?...51&postcount=2
+
+
http://forum.sa-mp.com/showpost.php?...51&postcount=2
+
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;
}