Advertisement
Guest User

Untitled

a guest
Jul 9th, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. /*
  2. Script file made by: Lifeman
  3.  
  4. Description:
  5. a Jail system made by Lifeman to jail players!
  6. */
  7. ["AL_JailSystem_Start", {
  8. private["_maxjailtime","_unit"];
  9.  
  10. _maxjailtime = 800 //The Jail time is only in mins (You can change it if you want)
  11. _unit = cursorTarget;
  12. if(isNull _unit) exitWith {};
  13. if(isNil "_unit") exitwith {};
  14. if(isNull _unit) exitWith {};
  15. if(!isPlayer _unit) exitWith {};
  16. if(!(_unit isKindOf "Man")) exitWith {};
  17. if(side _unit != civilian) exitWith {["You can Only arrest Civilians!", "#FF0000"] call AL_Msg_Hint;}; //Make sure he is a Civilian xD
  18.  
  19. _setjailtime = ctrlText 1400;
  20. if((parseNumber _setjailtime) > 800) exitWith {["The Max Jail Time is 800 Min's", "#FF0000"] call AL_Msg_Hint;};
  21. if((parseNumber _setjailtime) < 1) exitWith {["You are trying to jail someone for 0 mins?? that wont work man!", "#FF0000"] call AL_Msg_Hint;};
  22.  
  23. [[player,(parseNumber _jailTime)], "AL_JailSystem_TimerStart"] spawn BIS_fnc_MP;
  24. }] SV_Function;
  25.  
  26. ["AL_JailSystem_TimerStart", {
  27. //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
  28. while {_setjailtime >= 0} do {
  29. titleText [format["Jail Time: %1 Min(s) Left", (_setjailtime) ],"PLAIN"];
  30. sleep 60;
  31. _setjailtime = _setjailtime -1;
  32. };
  33. if (_setjailtime < 0) then {
  34. [format["%1's Jail time is now over! a Cop need to come releas him from the prison"], name player] call AL_global;
  35. //[format["%1's Jail time is now over!"], name player] call AL_global;
  36. //player setpos (getmarkerpos "jailfree");
  37. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement