Advertisement
MGT

ExileClient_object_player_safezone_checkSafezone.sqf

MGT
Dec 11th, 2015
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. /**
  2. * ExileClient_object_player_safezone_checkSafezone
  3. *
  4. * Exile Mod
  5. * www.exilemod.com
  6. * © 2015 Exile Mod Team
  7. *
  8. * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
  9. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
  10. */
  11.  
  12. if !(ExilePlayerInSafezone) then
  13. {
  14. if ((getPosATL (vehicle player)) call ExileClient_util_world_isInTraderZone) then
  15. {
  16. [] call ExileClient_object_player_event_onEnterSafezone;
  17. _controlAbort ctrlEnable false;
  18. _controlAbort ctrlSetText "Abort to Lobby";
  19. _controlAbort ctrlCommit 0;
  20. _controlSuicide ctrlEnable false;
  21. _controlSuicide ctrlSetText "Respawn";
  22. _controlSuicide ctrlCommit 0;
  23. systemChat "You cannot log out in a safezone";
  24. };
  25. ExileClientPlayerLastSafeZoneCheckAt = diag_tickTime;
  26. }
  27. else
  28. {
  29. if (diag_tickTime - ExileClientPlayerLastSafeZoneCheckAt >= 30) then
  30. {
  31. if !((getPosATL (vehicle player)) call ExileClient_util_world_isInTraderZone) then
  32. {
  33. [] call ExileClient_object_player_event_onLeaveSafezone;
  34. };
  35. ExileClientPlayerLastSafeZoneCheckAt = diag_tickTime;
  36. };
  37. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement