G[S]cripts
  • G[S]cripts Documentation
  • FiveM/RedM Asset Escrow
  • Trucking Job
    • Installation
    • Commands & Exports
    • Advanced Configuration
      • shared/config.lua
      • client/edit.lua
      • server/edit.lua
  • Advanced Trailers
    • Installation
    • Commands & Exports
    • Advanced Configuration
      • shared/config.lua
      • client/edit.lua
  • Motorhomes
    • Installation
    • Commands & Exports
    • Advanced Configuration
      • shared/config.lua
      • client/edit.lua
      • client/framework/*lua
      • server/framework/*.lua
  • Moonshining
    • Installation
    • Advanced Configuration
      • config.lua
      • editable/client.lua
  • Bank Robbery
    • Installation
    • Advanced Configuration
      • config.lua
      • editable/client.lua
      • editable/server.lua
  • GANG WARS
    • Installation
    • Advanced Configuration
      • config.lua
      • editable/client.lua
      • editable/server.lua
    • Exports
Powered by GitBook
On this page
  • Client
  • AtWar
  • AtWarWith
  • GetCurrentZone
  • Server
  • AtWar

This resource contains a few client side and server side exports that can be used in other resources.

Client

AtWar

Returns true or false if the player is at war with any gang

--- AtWar
--- Returns true or false if the player is at war with any gang
--- @usage exports.gs_gangwars:AtWar()
if exports.gs_gangwars:AtWar() then
    print('At war')
end

AtWarWith

Returns true or false if the player is at war with the specified gang

--- AtWarWith
--- Returns true or false if the player is at war with the specified gang
--- @usage exports.gs_gangwars:AtWarWith('gangname')
if exports.gs_gangwars:AtWarWith('gangname') then
    print('At war with gangname')
end

GetCurrentZone

Returns the current zone the player is in and the data of that zone if any otherwise nil

--- GetCurrentZone
--- Returns the current zone the player is in and the data of that zone if any otherwise nil
--- @usage local zone, data = exports.gs_gangwars:GetCurrentZone()
local zone, data = exports.gs_gangwars:GetCurrentZone()
if zone then
    print('Current zone', zone, json.encode(data))
end

Server

AtWar

Similar to the client side "AtWarWith" export but requires two params and returns true or false.

--- AtWar
--- Returns true or false if both gangs are at war
--- @usage exports.gs_gangwars:AtWar('gangname1', 'gangname2')
if exports.gs_gangwars:AtWar('gangname1', 'gangname2') then
    print('Both gangs are at war with eachother')
end
Previouseditable/server.lua

Last updated 3 months ago