Client
playAnim
Usage
Lib.playAnim(ped, data)ped:
numberdata:
objectisNetwork(optional):
booleandefault:
false
dict:
stringanim:
stringblendIn(optional):
floatdefault:
3.0
blendOut(optional):
floatdefault:
3.0
duration(optional):
numberdefault:
-1
flag(optional):
numberdefault:
49
playbackRate(optional):
numberdefault:
0
lockX(optional):
booleandefault:
false
lockY(optional):
booleandefault:
false
lockZ(optional):
booleandefault:
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:
numberdata:
objectscenario:
stringenterAnim(optional):
booleandefault:
true
Example
Lib.playScenario(ped, {
scenario = "WORLD_HUMAN_GUARD_STAND",
})playSpeech
Usage
Lib.playSpeech(ped, data)ped:
numberdata:
table{}isNetwork(optional):
booleandefault:
false
name:
stringparam:
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:
numbertarget:
vector3ornumber
Example
Lib.faceToCoords(entity, GetEntityCoords(PlayerPedId()))return:
number
faceToCoordsSmooth
Usage
Lib.faceToCoordsSmooth(ped, coords, delay)ped:
numbercoords:
vector3delay:
float(seconds)
Example
Lib.faceToCoordsSmooth(ped, vector3(0.0, 0.0, 0.0), 3.0)createObj
Usage
Lib.createObj(hash, coords, isNetwork, data)hash:
stringornumbercoords:
vector3isNetwork:
booleandata(optional):
objectrotation(optional):
objectp:
floatr:
floaty:
float
placeOnGround(optional):
booleanfreeze(optional):
booleaninvincible(optional):
booleandisableCollision(optional):
booleanalpha(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:
objectid:
numbernetId:
number
createPed
Usage
Lib.createPed(hash, coords, isNetwork, data)hash:
stringornumbercoords:
vector3isNetwork:
booleandata(optional):
objectplaceOnGround(optional):
booleandefaultVariation(optional):
booleanfreeze(optional):
booleangod(optional):
booleandisableRagdoll(optional):
booleancannotTarget(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:
objectid:
numbernetId:
number
createVeh
Usage
Lib.createVeh(hash, coords, isNetwork, data)hash:
stringornumbercoords:
vector4isNetwork:
booleandata(optional):
objectfreeze(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:
objectid:
numbernetId:
number
deleteEntity
Usage
Lib.deleteEntity(entity, invoker)entity:
numberinvoker:
string
Example
Lib.deleteEntity(entity)getVehicleFullName
Usage
Lib.getVehicleFullName(hash)hash:
stringornumber
Example
Lib.getVehicleFullName(hash)return:
string
setEntityStateBag
Usage
Lib.setEntityStateBag(netId, key, value)netId:
numberkey:
stringvalue:
any
Example
local veh = GetVehiclePedIsIn(PlayerPedId(), false)
if veh ~= 0 then
Lib.setEntityStateBag(NetworkGetNetworkIdFromEntity(veh), someoneInVehicle, true)
endLast updated