Client
playAnim
Usage
Lib.playAnim(ped, data)
ped:
number
data:
object
isNetwork(optional):
boolean
default:
false
dict:
string
anim:
string
blendIn(optional):
float
default:
3.0
blendOut(optional):
float
default:
3.0
duration(optional):
number
default:
-1
flag(optional):
number
default:
49
playbackRate(optional):
number
default:
0
lockX(optional):
boolean
default:
false
lockY(optional):
boolean
default:
false
lockZ(optional):
boolean
default:
false
Example
Lib.playAnim(ped, {
dict = "rcmnigel1c",
anim = "hailing_whistle_waive_a",
flag = 0,
})
Lib.playAnim(netId, {
isNetwork = true,
dict = "rcmnigel1c",
anim = "hailing_whistle_waive_a",
flag = 0,
})
playScenario
Usage
Lib.playScenario(ped, data)
ped:
number
data:
object
scenario:
string
enterAnim(optional):
boolean
default:
true
Example
Lib.playScenario(ped, {
scenario = "WORLD_HUMAN_GUARD_STAND",
})
playSpeech
Usage
Lib.playSpeech(ped, data)
ped:
number
data:
table{}
isNetwork(optional):
boolean
default:
false
name:
string
param:
string
Example
Lib.playSpeech(ped, {
name = "GENERIC_HI",
param = "SPEECH_PARAMS_STANDARD",
})
Lib.playSpeech(netId, {
isNetwork = true,
name = "GENERIC_HI",
param = "SPEECH_PARAMS_STANDARD",
})
faceToCoords
Usage
Lib.faceToCoords(entity, target)
entity:
number
target:
vector3
ornumber
Example
Lib.faceToCoords(entity, GetEntityCoords(PlayerPedId()))
return:
number
faceToCoordsSmooth
Usage
Lib.faceToCoordsSmooth(ped, coords, delay)
ped:
number
coords:
vector3
delay:
float(seconds)
Example
Lib.faceToCoordsSmooth(ped, vector3(0.0, 0.0, 0.0), 3.0)
createObj
Usage
Lib.createObj(hash, coords, isNetwork, data)
hash:
string
ornumber
coords:
vector3
isNetwork:
boolean
data(optional):
object
rotation(optional):
object
p:
float
r:
float
y:
float
placeOnGround(optional):
boolean
freeze(optional):
boolean
invincible(optional):
boolean
disableCollision(optional):
boolean
alpha(optional):
number
Example
Lib.createObj("ng_proc_coffee_01a", vector3(0.0, 0.0, 0.0), false)
Lib.createObj("ng_proc_coffee_01a", vector3(0.0, 0.0, 0.0), true, {
placeOnGround = true,
freeze = true,
invincible = true,
})
return:
object
id:
number
netId:
number
createPed
Usage
Lib.createPed(hash, coords, isNetwork, data)
hash:
string
ornumber
coords:
vector3
isNetwork:
boolean
data(optional):
object
placeOnGround(optional):
boolean
defaultVariation(optional):
boolean
freeze(optional):
boolean
god(optional):
boolean
disableRagdoll(optional):
boolean
cannotTarget(optional):
boolean
Example
Lib.createPed("a_m_y_downtown_01", vector3(0.0, 0.0, 0.0), false)
Lib.createPed("a_m_y_downtown_01", vector3(0.0, 0.0, 0.0), false, {
placeOnGround = true,
defaultVariation = true,
freeze = true,
god = true,
})
return:
object
id:
number
netId:
number
createVeh
Usage
Lib.createVeh(hash, coords, isNetwork, data)
hash:
string
ornumber
coords:
vector4
isNetwork:
boolean
data(optional):
object
freeze(optional):
boolean
Example
Lib.createVeh("sultanrs", vector3(0.0, 0.0, 0.0), false)
Lib.createVeh("sultanrs", vector3(0.0, 0.0, 0.0), false, {
freeze = true,
})
return:
object
id:
number
netId:
number
deleteEntity
Usage
Lib.deleteEntity(entity, invoker)
entity:
number
invoker:
string
Example
Lib.deleteEntity(entity)
getVehicleFullName
Usage
Lib.getVehicleFullName(hash)
hash:
string
ornumber
Example
Lib.getVehicleFullName(hash)
return:
string
setEntityStateBag
Usage
Lib.setEntityStateBag(netId, key, value)
netId:
number
key:
string
value:
any
Example
local veh = GetVehiclePedIsIn(PlayerPedId(), false)
if veh ~= 0 then
Lib.setEntityStateBag(NetworkGetNetworkIdFromEntity(veh), someoneInVehicle, true)
end
Last updated