Available Functions
This page details available functions to help you make your custom changes to the system or script your own unique activity.
Functions.RayCast(dist: number, ignore_entity: entity) -> hit: boolean, endCoords: vector3, entityHit: entity, surfaceNormal: number, materialHash: string
Functions.Reload() --- Reloads the players Gang Data in the UI
Functions.LoadModel(model: strig) -> boolean
Functions.RequestScaleform(scaleform: scaleform]) -> loaded scaleform
Functions.PlacePed(cb: function], model: string]) -> vector4
Functions.GetCurrentGangTurf() -> string
Functions.GetCenterOfTurf(gangid: string) -> vector3
Functions.Get_Gang_Color() -> number
Functions.new_cam(is_spline: boolean) -> camera
Functions.new_player_cam() -> player camera
Functions.Fade() --- Fades and Unfades the screen for transitions
Functions.IsCoordinatesAtZero(coords: vector3 | vector4, is_vector4: boolean) -> boolean
Functions.Get_Heading_Between_Coords(coords1: vector3, coords2: vector3) -> number
Functions.PlaySound(soundName: string, volume: number) -- Plays sound if it is in the web/sounds folder
Functions.Generate_Random_Coordinates_By_Points(points: TerritoryPoints) -> vector3
-- ^ How to get territory points? -> GlobalState.GangData[gangid]?.territory?.points
Sprays.RequestSpray(gang: string, inEnemyTurf: boolean, enemyGang: string) -- Initiates Spraying Feature
-------------------------------------------------------------------------------
-- ^Here is a way to get inEnemyTurf and enemyGang if you need it. See below
local turf = Functions.GetCurrentGangTurf()
local inEnemyTurf, enemyGang
local plygang = QBCore.Functions.GetPlayerData().gang.name
if not (turf == plygang) then
inEnemyTurf = true
enemyGang = turf
end
Sprays.RequestSpray(plygang, inEnemyTurf, enemyGang)
-------------------------------------------------------------------------------Last updated