08.02.2017, 02:22
Код:
COMMAND:securitycamera(playerid, params[]) { if(PlayerStat[playerid][FactionID] != 1) return SendClientMessage(playerid, GREY, "You are not a Prison Guard."); //if(IsPlayerInRangeOfPoint(playerid, 8.0, -25.6415,-374.0972,14.9761)) else if(!IsPlayerInRangeOfPoint(playerid, 434.2499,1521.3287,1001.0000)) SendClientMessage(playerid, GREY, "You are not at the Control Room."); return 1; } { if(PlayerStat[playerid][SecurityCameraStatus] == 1) { PlayerStat[playerid][SecurityCameraStatus] = 0; TogglePlayerControllable(playerid, 1); SetCameraBehindPlayer(playerid); GameTextForPlayer(playerid, "~r~Security Camera Disabled.", 3000, 4); PlayerStat[playerid][SecurityCameraNumber] = 0; TextDrawHideForPlayer(playerid, SecurityCameraTextDraw); } else if(PlayerStat[playerid][SecurityCameraStatus] == 0) { PlayerStat[playerid][SecurityCameraStatus] = 1; TogglePlayerControllable(playerid, 0); SetPlayerCameraPos(playerid, -19.8700,-335.8774,10.7141); SetPlayerCameraLookAt(playerid, 7.8794,-371.8924,6.4286); PlayerStat[playerid][SecurityCameraNumber] = 1; GameTextForPlayer(playerid, "~g~Security Camera Enabled.", 3000, 4); TextDrawShowForPlayer(playerid, SecurityCameraTextDraw); } } else return SendClientMessage(playerid, GREY, "You are not at the Control Room."); return 1; }