Skip to content

Important functions and variables

This section details the main functions and variables used or exposed by the script.
Understanding these elements will help you customize or integrate the script with other resources.

These two functions will be executed when a sticky bomb explodes on a vehicle; they receive the explosion position and the affected player’s information. For example, when the bomb explodes, the car stops and you can add code to disable the radio, make the phone unusable, etc..

Client-side code executed when the bomb explodes

Section titled “Client-side code executed when the bomb explodes”

The function is located in the folder: /client/opensource.lua.

function FunctionCustomExploseBombClient(pos, clientId, serverId, ped)
-- Your code
end

Server-side code executed when the bomb explodes

Section titled “Server-side code executed when the bomb explodes”

The function is located in the folder: /server/opensource.lua.

function FunctionCustomExploseBombServer(pos, netId)
-- Your code
end
  • Use local variables (local) to limit scope to the relevant function or script.