Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Script file made by: Lifeman
- Description:
- a Jail system made by Lifeman to jail players!
- */
- ["AL_JailSystem_Start", {
- private["_maxjailtime","_unit"];
- _maxjailtime = 800 //The Jail time is only in mins (You can change it if you want)
- _unit = cursorTarget;
- if(isNull _unit) exitWith {};
- if(isNil "_unit") exitwith {};
- if(isNull _unit) exitWith {};
- if(!isPlayer _unit) exitWith {};
- if(!(_unit isKindOf "Man")) exitWith {};
- if(side _unit != civilian) exitWith {["You can Only arrest Civilians!", "#FF0000"] call AL_Msg_Hint;}; //Make sure he is a Civilian xD
- _setjailtime = ctrlText 1400;
- if((parseNumber _setjailtime) > 800) exitWith {["The Max Jail Time is 800 Min's", "#FF0000"] call AL_Msg_Hint;};
- if((parseNumber _setjailtime) < 1) exitWith {["You are trying to jail someone for 0 mins?? that wont work man!", "#FF0000"] call AL_Msg_Hint;};
- [[player,(parseNumber _jailTime)], "AL_JailSystem_TimerStart"] spawn BIS_fnc_MP;
- }] SV_Function;
- ["AL_JailSystem_TimerStart", {
- //player setpos (getmarkerpos "jail"); //This is disabled for the roleplay so the cops have to drag him into jail but if you want to enable it then go head
- while {_setjailtime >= 0} do {
- titleText [format["Jail Time: %1 Min(s) Left", (_setjailtime) ],"PLAIN"];
- sleep 60;
- _setjailtime = _setjailtime -1;
- };
- if (_setjailtime < 0) then {
- [format["%1's Jail time is now over! a Cop need to come releas him from the prison"], name player] call AL_global;
- //[format["%1's Jail time is now over!"], name player] call AL_global;
- //player setpos (getmarkerpos "jailfree");
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement