Guest User

Untitled

a guest
Nov 30th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.95 KB | None | 0 0
  1. RegisterNetEvent('esx_eden_garage:EnableSocietyGarage')
  2. AddEventHandler('esx_eden_garage:EnableSocietyGarage', function(society, bool)
  3.     if bool then
  4.         for k,v in pairs (Config.SocietyGarages) do
  5.             for key, value in pairs (v) do
  6.                 if k == society then
  7.                     exports.ft_libs:EnableArea("esx_eden_garage_area_"..k.."_deletepoint_society_"..key)
  8.                     exports.ft_libs:EnableArea("esx_eden_garage_area_"..k.."_spawnpoint_society_"..key)
  9.                     exports.ft_libs:EnableArea("esx_eden_garage_area_"..k.."_garage_society_"..key)
  10.                 end
  11.             end
  12.         end
  13.     else
  14.         for k,v in pairs (Config.SocietyGarages) do
  15.             for key, value in pairs (v) do
  16.                 if k == society then
  17.                     exports.ft_libs:DisableArea("esx_eden_garage_area_"..k.."_deletepoint_society_"..key)
  18.                     exports.ft_libs:DisableArea("esx_eden_garage_area_"..k.."_spawnpoint_society_"..key)
  19.                     exports.ft_libs:DisableArea("esx_eden_garage_area_"..k.."_garage_society_"..key)
  20.                 end
  21.             end
  22.         end
  23.     end
  24. end)
Advertisement
Add Comment
Please, Sign In to add comment