-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction_list.txt
More file actions
553 lines (438 loc) · 29.7 KB
/
Copy pathfunction_list.txt
File metadata and controls
553 lines (438 loc) · 29.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
|Framework: MOSS
|Game: Driver: Parallel Lines
|By: BuilderDemo7
# FUNCTION TEXT FORMAT
# most of them are similiar with C++ header format, so if you're familiar with that you already understand them.
# multiple return values:
# <return_type1>: <return_name1>, <return_type2>: <return_name2>, <return_type3>: <return_name3>, ... MyFunc(<parameter1>)
# Example -- int: value1, bool: value2, float: value3 MyFunction(bool ok, int aInteger, float aBoolean)
# single return values:
# <return_type1>: <return_name1>, <return_type2>: <return_name2>, <return_type3>: <return_name3>, ... MyFunc(<parameter1>)
# Example -- int MyFunction(bool ok, int aInteger, float aBoolean)
# please check "enum_list.txt" file for checking the constants/enumerations
// Events
# should be defined as
# function <event name>(<parameters if there are any>)
# e.g. -> function step() end
void start() # called everytime the loading screen is finished and that the player is ready to move
void shutdown() # called everytime the simulation is shutting down completely (even in restarts), WARNING: not called in mission checkpoints / mini-games!
void step() # called every frame the game updates when unpaused
void post_step() # called after step(), usually in the same frame but in a different position
void draw_mission() # called every frame the mission is about to be drawn
void draw_targets() # called every frame the target manager is drawn (e.g. objective icons/markers, etc.)
// Global
# Mission Functions
Character GetPlayerCharacter()
Character_Actor GetPlayerActor()
void ClearMessages() # clear mission comments
void ShowMissionComment(float duration, string message)
void EndAllLifeEvents() # exclude all missions!
void LaunchVEdit() # launches the garage menu
{ Vehicle } GetVehicleInstances() # NOTE: not the same as GetLifeInstances() and not much controllable as Vehicle_LifeInstance or Vehicle_Actor
{ Character } GetCharacterInstances([ int role = -1) # NOTE: if role is equal to -1 it will get characters from all roles (including player as first of the list, not the same as GetLifeInstances() and not much controllable as Character_LifeInstance or Character_Actor
void SetSpoolCentre(float x, float z) # useful for defining area to be loaded around for the city, vehicles, etc.
float GetWorldTime()
void SetWorldTime(float newHour)
void ParkVehicle(Vehicle vehicle)
{ string } GetPlaylistFileNames()
{ int } GetPlaylistOrder()
void SetVehicleDensity(float density, [ AIManagerVehicleTypeEnum vehicleDensityType = -1)
Viewport GetGameViewport()
Viewport GetOverheadMapViewport()
Vector GetClosestCharacterSnapLocationAt(Vector atPosition, [ float radius = 400.0)
Vector GetNearestAttractorPositionAt(Vector atPosition, int attractorType, [ float radius = 400.0)
int GetModelHandleFromGadget(EGadgetType gadget)
void ScreenFade(string direction["in", "out", "clear"], [ float duration = 0.5, Vector fromColor = Vector.new(0,0,0), Vector toColor = Vector.new(0,0,0), bool fadeAudio = false)
void ToggleHUD(bool status)
void ToggleOverlays(bool status)
void ToggleOverheadMap(bool status)
* W.I.P, this crashes the game
void ToggleOverlayElement(EOverlayID whichOverlay, bool status)
void ToggleOverlayGroup(EOverlayGroup whichGroup, bool status)
void AssignValuesToOverlayElement(EOverlayID whichOverlay, int val1, [ int val2 = 0, int val3 = 0, int val4 = 0)
float GetDeltaTime()
void SetLifeEventStatus(int eventId, int eStatus, [ bool fromStatusControl = false)
void DisableIncidentalSpooling(bool killAll = false)
void EnableIncidentalSpooling()
void AutoSave()
void SetHamsterRandomSeed(int seed)
int GetHamsterRandomSeed()
# HUD
void ActivatePager()
void DrawText(string text, float x, float y, [ EJustify justify = EJustify_Centered, float sx = 1.0, float sy = 1.0, float r = 1.0, float g = 1.0, float b = 1.0, float a = 1.0, float spacing = 0.0, float w = 1.0)
# Object Creation & Destruction
* (Legacy) Vehicle Instance used in first alpha versions
Vehicle CreateVehicleInstance(int model, float x, float y, float z, [ float angle = 0.0)
void DestroyVehicleInstance(Vehicle vehicle)
* Vehicle Actor: Supports actions with characters and more features
Vehicle_Actor CreateVehicle(int model, float x, float y, float z, [ float angle = 0.0, bool startCreated = true, int tintValue = 1, float initialSpeed = 0.0, float initialFelony = 0.0, impactSoftness = 1.0, explosionSoftness = 1.0, bulletSoftness = 1.0, impactFragility = 1.0, bool useRandomTint)
void DestroyVehicle(Vehicle_Actor vehicle)
* Helicopter
Helicopter CreateHelicopter(float x, float y, float z, [ float velx = 0.0, float vely = 0.0, float velz = 0.0, float angle = 0.0, bool isGoonHeli = true, bool destroyable = false, bool isLanded = false, bool helicopterOnlySpline = false)
* Prop
Prop CreateProp(Vector position, EGadgetType gadgetType, [ Quaternion rotation = Quaternion.new(0,0,0,0), bool canbeTargeted = false, bool startCreated = true)
* CameraSelect + Camera
CameraSelect CreateCameraSelect(ECameraSelectType cameraType, LifeActor target, ECameraSelect_VehicleCamType vehiclePosition, [ float duration = 60.0, float zoom = 1.0, float motionBlur = 0.0, float speed = 1.0, float blendTime = 0.0)
Camera CreateCamera(Vector position, [ Quaternion rotation = Quaternion.new(0,0,0,0), LifeActor attachTo = nil, LifeActor lookAt = nil)
* Character Actor
Character_Actor CreateCharacter(int skin, float x, float y, float z, [ float angle = 0.0, bool startCreated = true, EWeapons weapon, float initialHealth = 1.0, float initialFelony = 0.0, Vehicle_Actor initialVehicle = nil, int initialVehicleSeat = 0, float vulnerability = 1.0, bool addToFelonyManager = false, bool doNotUseIdleAnims = false, bool isPlayer = false, bool ignorePlayerRegister = false, bool keepSkin = false, int playerNumber = 0)
* Point_Actor
Point_Actor CreatePoint(Vector position, [ Quaternion rotation = Quaternion(0, 0, 0, 0)) # useful for marking points to be used as a target/objective icon
* TestVolume
TestVolume CreateTestVolume(Vector position, [ Quaternion rotation = Quaternion(0, 0, 0, 0), EPrimitiveType primType = EPrimitiveType_Cylinder, float widthOrRadius = 2.5, float length = 0.0, height = 5.0, LifeActor attachTo = nil)
* AICharacterAttack
AICharacterAttack CreateCharacterAttackAI(LifeActor attackee, [ LifeActor attacker = nil, float accuracy = 1.0)
# Camera Functions
void SetCameraPosition(Vector pos) # doesn't work quite right
Vector GetCameraPosition()
Vector GetCameraForwardVector()
Vector GetCameraRightVector()
Vector GetCameraUpVector()
void ToggleFreeCam(bool status, [ int gamepadId = 0)
# Music / Sounds
void SetMusicTrack(int trackId)
Audio CreateAudio(int bankId, int sampleId, float volume = 1.0, bool vocal = false, LifeActor attachTo = nil)
# Profile Settings
float GetMileometer() # probably needs to be converted in kilometer or miles
int GetMoney()
void SetMoney(int amount)
void SetGameDifficulty(int difficultyLevel) # 0-3 (easiest to hardest)
int GetGameDifficulty()
Era GetEra()
# Life Instances
{ LifeInstance } GetLifeInstances()
# Felony Manager
void SetVehicleFelonyLevel(Vehicle vehicle, float felony, [ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP) # equivalent to Vehicle:SetFelony(...)
void SetFelonyLevel(Character character, float felony, [ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP) # equivalent to Character:SetFelony(...)
float GetFelonyLevel(Character character, [ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
void SetChaseCarMaxChasers(int maxChasers, [ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
void CreatePatrolHelicopterUnit(float x, float y, float z, [ float angle, AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP) : void CreatePatrolHelicopterUnit(Vector position, [ float angle, AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
void CreatePatrolCharacterOnFoot(float x, float y, float z, [ float angle, AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP) : void CreatePatrolCharacterOnFoot(Vector position, [ float angle, AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
void CreatePatrolVehicleUnit(float x, float y, float z, float angle, [ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP, bool snapToTerrain = false, bool useSecondaryVehicleType = false) : void CreatePatrolVehicleUnit(Vector position, [ float angle, AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP, bool snapToTerrain = false, bool useSecondaryVehicleType = false)
void EnableCops(bool onOff)
void DeleteAllChaseEntities(AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
void AddChaseCarWeaponType(EWeapons weapon, [ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
void AddChaseCarVehicleType(int vehicleType, bool isSecondaryVehicle, [ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
void RemoveChaseCarVehicleType(int vehicleType, bool isSecondaryVehicle, [ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
void AddChaseCarCharacterType(int skinID, [ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
void RemoveChaseCarCharacterType(int skinID, [ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
void SetChaseCarPatrolDensity(float density, [ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
# Player Functions
bool IsPlayerFreeAiming()
bool HasPlayerShotRecently()
void AddAllWeaponsForPlayer()
void ToggleIGCS(bool status)
# Overhead Map
MapItem AddMapItem(int type, Vector position, float angle) : MapItem AddMapItem(int type, float x, float y, float z, float angle)
{ MapItem } GetMapItems() # all map items are returned except the map marker, player and camera items
bool GetMapMarkerActive()
void SetMapMarkerActive(bool active)
MapItem GetPlayerMapItem()
MapItem GetCameraMapItem()
MapItem GetMapMarkerItem()
# Resource Manager
void SetEntityPriority(SpooledPackageType package, int entityID, ESpoolPriority priority)
void RequestEntity(SpooledPackageType package, int entityID, ESpoolPriority priority) # WARNING: may take a longer time to load, try SetEntityPriority(...) instead
bool IsEntityLoaded(SpooledPackageType package, int entityID)
bool IsEntityPresent(SpooledPackageType package, int entityID)
# Memory Editing
* WARNING: Please check if the address is valid otherwise it will cause the game to crash with access violation.
void memwrite(uint address, string buffer, uint size)
string memread(uint address, uint size)
void mempatch(uint address, intptr_t labelPtr)
void meminject(uint address, intptr_t labelPtr, int type)
intptr_t memalloc(uint size)
void memfree(intptr_t blockPtr)
# Memory Cast
* WARNING: Please check if the address is valid otherwise it will cause the game to crash with access violation.
float castfloat(string buffer, [ int offset = 0)
double castdouble(string buffer, [ int offset = 0)
int castint(string buffer, [ int offset = 0)
uint castuint(string buffer, [ int offset = 0)
short castshort(string buffer, [ int offset = 0)
ushort castushort(string buffer, [ int offset = 0)
# Class Memory Cast
* WARNING: Please check if the address is valid otherwise it will cause the game to crash with access violation.
Character castCharacter(intptr_t address)
Vehicle castVehicle(intptr_t address)
Helicopter castHelicopter(intptr_t address)
MapItem castMapItem(intptr_t address)
# Input
int GetAsyncKeyState(int keycode) # gets key state (Windows messaging)
bool WasKeyPressedOnce(int keycode) # (Windows messaging)
float: value, bool: debounce GetInputInfo(EInputAction action) # gets input directly from the game's input manager
# Misc
Vehicle: vehicle, EVehicleDoor: closestDoor FindClosestVehicleForEntry(Character character, [ bool shyOfPassengers = false, bool willDrive = true, bool checkBack = true)
# Math
float GetDistanceBetweenPoints2D(float x1, float y1, float x2, float y2)
float GetDistanceBetweenPoints3D(float x1, float y1, float z1, float x2, float y2, float z2)
// Classes
# Vector
float Vector.X
float Vector.Y
float Vector.Z
float Vector.Magnitude # read-only
float Vector.MagnitudeSqr # read-only
float Vector.Heading # angle in radians, read-only
Vector Vector.new([ float x = 0, float y = 0, float = z) # local vec = Vector.new()
void Vector:Destroy()
Vector Vector:operator*(Vector a, Vector b) # expression: a * b
Vector Vector:operator+(Vector a, Vector b) # expression: a + b
Vector Vector:operator-(Vector a, Vector b) # expression: a - b
# Quaternion
float Quaternion.X
float Quaternion.Y
float Quaternion.Z
float Quaternion.W
Quaternion Quaternion.new([float x = 0, float y = 0, z = 0, w = 0) # local qua = Quaternion.new()
Quaternion Quaternion.FromEuler(float yaw, float pitch, float roll)
void Quaternion:Destroy()
Vector Quaternion:ToEuler() # returned in degrees, use math.rad() to convert
# Character
void Character:SetPosition(float x, float y, float z) : Character:SetPosition(Vector pos)
Vector Character:GetPosition()
float Character:GetAngle() : float Character:GetHeading() # returned in radians, use math.deg() to convert
void Character:SetAngle(float radAngle) : float Character:SetHeading(float radHeading) # will use radians
intptr_t Character:GetPointer() # CCharacter*
Vehicle Character:GetVehicle()
Vehicle Character:GetEnteringVehicle()
void Character:TeleportIntoVehicle(Vehicle target, int seat)
bool Character:GetCanExitVehicle()
void Character:SetCanExitVehicle(bool status)
void Character:ForceIdleMode()
void Character:SetFelony(float felony, [ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
float Character:GetFelony([ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
Vector Character:GetForward() : Vector Character:GetForwardVector()
Vector Character:GetRight() : Vector Character:GetRightVector()
void Character:PlayMissionAnimation(string animationName, [ bool startImmediately = true)
void Character:PlayMissionAnimationByID(int animationId, [ bool startImmediately = true)
void Character:PlayMissionAnimationByHash(int animHash, [ bool startImmediately = true)
void Character:EnterVehicle(Vehicle vehicle, int seat, bool hijack);
void Character:ExitVehicle()
void Character:EjectFromVehicle()
void Character:SetArrested()
void Character:SetHealth(float health) # from 0 to 1, e.g. 0.5, 0.6, etc.
float Character:GetHealth()
void Character:SwapSkin(int newSkin, [ int animTypeFromSkin = newSkin) # animTypeFromSkin = a skin ID to base off the aimation type
void Character:Walk(Vector velocity, [ bool strafe = false, bool scared = false, float w = 1.0)
Character_LifeInstance Character:PromoteToLifeInstance()
void Character:SetModel(int model) : void Character:SetSkin(int skin)
int Character:GetModel() : int Character:GetSkin()
void Character:SetAnimType(int animType) # sort of a walking style, etc.
int Character:GetAnimType()
# Vehicle
void Vehicle:SetPosition(float x, float y, float z) : Vehicle:SetPosition(Vector pos)
Vector Vehicle:GetPosition()
float Vehicle:GetAngle() : float Vehicle:GetHeading() # returned in radians, use math.deg() to convert
void Vehicle:SetAngle(float radAngle) : float Vehicle:SetHeading(float radHeading) # will use radians
intptr_t Vehicle:GetPointer() # CVehicle*
Vector Vehicle:GetForward() : Vector Vehicle:GetForwardVector()
Vector Vehicle:GetRight() : Vector Vehicle:GetRightVector()
void Vehicle:SetVelocity(float x, float y, float z) : Vehicle:SetVelocity(Vector velocity)
Vector Vehicle:GetVelocity()
void Vehicle:SetAngularVelocity(float x, float y, float z, float w) : Vehicle:SetVelocity(Quaternion angularVel)
Quaternion Vehicle:GetAngularVelocity()
void Vehicle:SetRotation(Quaternion rotation)
Quaternion Vehicle:GetRotation()
Character Vehicle:GetDriver()
int Vehicle:GetType() : int Vehicle:GetModel() # Vehicle names are usually in Text/vehnames.txt file
void Vehicle:SendManipulationPacket(float thrust, float steerAngle, [ float burnout = 0, float leanFB = 0, float hornVolume = 0, bool nitro = false, bool handbrake = false, bool brakeIsPressed = false, bool action1 = false)
void Vehicle:Destroy()
void Vehicle:MakeInfiniteMass() : void Vehicle:GiveInfiniteMass()
void Vehicle:MakeStatic()
void Vehicle:MakeDynamic()
float Vehicle:GetNitro() # from 0.0 to 1.0, e.g. 0.1 (10% nitro), 0.5 (50% nitro), etc.
void Vehicle:SetNitro(float amount)
void Vehicle:ResetCustomData()
void Vehicle:AddCustomDataPart(int group, int part)
void Vehicle:SetProperty(int propertyId, number newValue, string type ["float", "int"])
number Vehicle:GetProperty(int propertyId, string type ["float", "int"])
void Vehicle:Damage(float damageLevel, [ ePartSubType part = -1) # part -1 means most of the parts will be damaged
float Vehicle:GetDamage()
void Vehicle:SetDamage(float amount)
void Vehicle:Explode()
void Vehicle:Fix() : void Vehicle:Repair()
void Vehicle:ActivateLamp(ePartSubType lightPart, bool onoff, [ bool forceOverride = false) : void Vehicle:SetLamp(ePartSubType lightPart, bool onoff, [ bool forceOverride = false)
void Vehicle:ActivateSiren(bool onoff)
void Vehicle:SetFelony(float felony, [ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
float Vehicle:GetFelony([ AIFelonySystemPatrolCarTypeEnum patrolType = E_PATROLCARTYPE_COP)
void Vehicle:SetPhysicsPriority(int priority)
int Vehicle:GetPhysicsPriority()
void Vehicle:SetRenderingPriority(int priority)
int Vehicle:GetRenderingPriority()
void Vehicle:SetColor(float r, float g, float b) # color values are a scale from 0.0 to 1.0, e.g. (1.0, 0.0, 0.0 - red)
float: r, float: g, float: b Vehicle:GetColor()
float Vehicle:GetRPM()
int Vehicle:GetGear()
# Vehicle_Actor
void Vehicle_Actor:SetPosition(float x, float y, float z) : Vehicle_Actor:SetPosition(Vector pos)
Vector Vehicle_Actor:GetPosition()
Vehicle Vehicle_Actor:GetInstance()
Vehicle_LifeInstance Vehicle_Actor:GetLifeInstance()
intptr_t Vehicle_Actor:GetPointer() # CLifeActor_Vehicle*
void Vehicle_Actor:Create() : void Vehicle_Actor:Instantiate()
void Vehicle_Actor:Destroy() : void Vehicle_Actor:Delete()
Vector Vehicle_Actor:GetForward() : Vector Vehicle_Actor:GetForwardVector()
Vector Vehicle_Actor:GetRight() : Vector Vehicle_Actor:GetRightVector()
void Vehicle_Actor:AddObjectiveIcon(ObjectiveIconDisplayType displayType, [ ObjVisibility_MinimapAndModel visibility = ObjVisibility_MinimapAndModel, bool displayMinimapArrow = false, bool displayAsCop = false, float additionalHeightOffset = 0.0, int lifeEventType = 0)
void Vehicle_Actor:RemoveObjectiveIcon(ObjectiveIconDisplayType displayType, [ ObjVisibility_MinimapAndModel visibility = ObjVisibility_MinimapAndModel, bool displayMinimapArrow = false, bool displayAsCop = false, float additionalHeightOffset = 0.0, int lifeEventType = 0)
int Vehicle_Actor:hamsterFactoryType()
# Character_Actor
void Character_Actor:SetPosition(float x, float y, float z) : Character_Actor:SetPosition(Vector pos)
Vector Character_Actor:GetPosition()
Character Character_Actor:GetInstance()
Character_LifeInstance Character_Actor:GetLifeInstance()
intptr_t Character_Actor:GetPointer() # CLifeActor_Character*
void Character_Actor:Create() : void Character_Actor:Instantiate()
void Character_Actor:Destroy() : void Character_Actor:Delete()
Vector Character_Actor:GetForward() : Vector Character_Actor:GetForwardVector()
Vector Character_Actor:GetRight() : Vector Character_Actor:GetRightVector()
void Character_Actor:GoWander([ float speed = 30.0, float acceleration = 1.0, float traction = 1.0, float handOfTom = 1.0, bool driveAsCiv = false, int cheatSettings = 1) # NOTE: when driveAsCiv is set to true, the AI will drive just like a civilian, the game will crash if the game doesn't find a suitable road map for the AI (so place it on the road to prevent this crash).
void Character_Actor:StopWander()
void Character_Actor:DriveToTarget(LifeActor target, [ float speed = 30.0, float acceleration = 1.0, float traction = 1.0, float handOfTom = 1.0, bool driveAsCiv = false, bool stopAtTarget = true, bool useHandbrakeToStop = false, int cheatSettings = 1) # NOTE: when driveAsCiv is set to true, the AI will drive just like a civilian, the game will crash if the game doesn't find a suitable road map for the AI (so place it on the road to prevent this crash).
void Character_Actor:StopDrivingToTarget(LifeActor target)
void Character_Actor:ChaseTarget(LifeActor target, [ float speed = 30.0, float acceleration = 1.0, float traction = 1.0, float handOfTom = 1.0, int pursuitMode = 1, bool driveAsCiv = false, bool stopAtTarget = true, bool useHandbrakeToStop = false, int cheatSettings = 1) # NOTE: when driveAsCiv is set to true, the AI will drive just like a civilian, the game will crash if the game doesn't find a suitable road map for the AI (so place it on the road to prevent this crash).
void Character_Actor:StopChasingTarget(LifeActor target)
void Character_Actor:AddObjectiveIcon(ObjectiveIconDisplayType displayType, [ ObjVisibility_MinimapAndModel visibility = ObjVisibility_MinimapAndModel, bool displayMinimapArrow = false, bool displayAsCop = false, float additionalHeightOffset = 0.0, int lifeEventType = 0)
void Character_Actor:RemoveObjectiveIcon(ObjectiveIconDisplayType displayType, [ ObjVisibility_MinimapAndModel visibility = ObjVisibility_MinimapAndModel, bool displayMinimapArrow = false, bool displayAsCop = false, float additionalHeightOffset = 0.0, int lifeEventType = 0)
int Character_Actor:hamsterFactoryType()
# Point_Actor
void Point_Actor:SetPosition(Vector pos)
Vector Point_Actor:GetPosition()
void Point_Actor:SetRotation(Quaternion rotation)
Quaternion Point_Actor:GetRotation()
intptr_t Point_Actor:GetPointer()
void Point_Actor:SetHeading(float heading) : void Point_Actor:SetAngle(float angle) # will use radians
??? Point_Actor:SetHeading(???) : ??? Prop:GetAngle(???) # W.I.P DO NOT USE, will be returned in radians, use math.deg() to convert
??? Point_Actor:SetVelocity(???) # W.I.P DO NOT USE
??? Point_Actor:GetVelocity(???) # W.I.P DO NOT USE
??? Point_Actor:GetForwardVector(???) # W.I.P DO NOT USE
??? Point_Actor:GetRightVector(???) # W.I.P DO NOT USE
int Point_Actor:hamsterFactoryType()
void Point_Actor:AddObjectiveIcon(ObjectiveIconDisplayType displayType, [ ObjVisibility_MinimapAndModel visibility = ObjVisibility_MinimapAndModel, bool displayMinimapArrow = false, bool displayAsCop = false, float additionalHeightOffset = 0.0, int lifeEventType = 0)
void Point_Actor:RemoveObjectiveIcon(ObjectiveIconDisplayType displayType, [ ObjVisibility_MinimapAndModel visibility = ObjVisibility_MinimapAndModel, bool displayMinimapArrow = false, bool displayAsCop = false, float additionalHeightOffset = 0.0, int lifeEventType = 0)
# Vehicle_LifeInstance
Vehicle Vehicle_LifeInstance:GetInstance()
intptr_t Vehicle_LifeInstance:GetPointer() # CLifeInstance_Vehicle*
void Vehicle_LifeInstance:SetMustangHandling(bool on)
void Vehicle_LifeInstance:UnregisterSpoolHandler() # disable ping-out, useful for players or permanent/constant loaded instances
void Vehicle_LifeInstance:SetCreateDamaged(bool createDamaged)
bool Vehicle_LifeInstance:GetCreateDamaged()
void Vehicle_LifeInstance:SetFelony(float felony)
float Vehicle_LifeInstance:GetFelony()
void Vehicle_LifeInstance:SetPosition(Vector position)
Vector Vehicle_LifeInstance:GetPosition()
# Character_LifeInstance
Character Character_LifeInstance:GetInstance()
intptr_t Character_LifeInstance:GetPointer() # CLifeInstance_Character*
void Character_LifeInstance:SetPosition(Vector position)
Vector Character_LifeInstance:GetPosition()
void Character_LifeInstance:UnregisterSpoolHandler() # disable ping-out, useful for players or permanent/constant loaded instances
Character_Actor Character_LifeInstance:PromoteToLifeActor()
# Helicopter
void Helicopter:SetDesiredPosition(Vector pos) : void Helicopter:SetPosition(Vector pos)
bool Helicopter:StepTo(Vector pos, [ float angle = 0, float speed = 25) # angle is in radians, returns true if reached destination otherwise false
Vector Helicopter:GetPostion()
float Helicopter:GetAngle() : float Helicopter:GetHeading() # returned in radians, use math.deg() to convert
void Helicopter:SetAngle(float radAngle) : float Helicopter:SetHeading(float radHeading) # will use radians
Vector Helicopter:GetDesiredPosition()
intptr_t Helicopter:GetPointer() # AIHelicopterClass*
Vector Helicopter:GetForward() : Vector Helicopter:GetForwardVector()
Vector Helicopter:GetRight() : Vector Helicopter:GetRightVector()
void Helicopter:SetVelocity(float x, float y, float z) : Helicopter:SetVelocity(Vector velocity)
Vector Helicopter:GetVelocity()
void Helicopter:SetDamage(float damage)
float Helicopter:GetDamage()
void Helicopter:UpdateMotion() # call this on function step()
# MapItem
void MapItem:SetPosition(Vector pos)
Vector MapItem:GetPosition()
intptr_t MapItem:GetPointer() # SMapItem*
void MapItem:SetHeading(float heading) : void MapItem:SetAngle(float angle) # will use radians
float MapItem:GetHeading() : float MapItem:GetAngle() # returned in radians, use math.deg() to convert
void MapItem:SetType(EMapItem type)
EMapItem MapItem:GetType()
void MapItem:SetShowArrow(bool status)
bool MapItem:GetShowArrow()
# ObjectiveIcon
ObjectiveIcon ObjectiveIcon.new() # local oicon = ObjectiveIcon.new()
void ObjectiveIcon:SetPosition(Vector pos)
Vector ObjectiveIcon:GetPosition()
intptr_t ObjectiveIcon:GetPointer() # Lua_ObjectiveIcon*
void ObjectiveIcon:SetHeading(float heading) : void ObjectiveIcon:SetAngle(float angle) # will use radians
float ObjectiveIcon:GetHeading() : float ObjectiveIcon:GetAngle() # returned in radians, use math.deg() to convert
void ObjectiveIcon:SetType(int type)
int ObjectiveIcon:GetType()
void ObjectiveIcon:Draw() # use this in draw_mission() event
# Prop
void Prop:SetPosition(Vector pos)
Vector Prop:GetPosition()
void Prop:SetRotation(Quaternion rotation)
Quaternion Prop:GetRotation()
intptr_t Prop:GetPointer() # CLifeActor_Prop*
void Prop:Create() : void Prop:Instantiate()
void Prop:Destroy() : void Prop:Delete()
int Prop:GetModelHandle()
int Prop:SetModelHandle(int handle)
void Prop:SetHeading(float heading) : void Prop:SetAngle(float angle) # will use radians
??? Prop:SetHeading(???) : ??? Prop:GetAngle(???) # W.I.P DO NOT USE, will be returned in radians, use math.deg() to convert
??? Prop:SetVelocity(???) # W.I.P DO NOT USE
??? Prop:GetVelocity(???) # W.I.P DO NOT USE
??? Prop:GetForwardVector(???) # W.I.P DO NOT USE
??? Prop:GetRightVector(???) # W.I.P DO NOT USE
int Prop:hamsterFactoryType()
void Prop:SetGadgetType(EGadgetType gadget)
void Prop:AddObjectiveIcon(ObjectiveIconDisplayType displayType, [ ObjVisibility_MinimapAndModel visibility = ObjVisibility_MinimapAndModel, bool displayMinimapArrow = false, bool displayAsCop = false, float additionalHeightOffset = 0.0, int lifeEventType = 0)
void Prop:RemoveObjectiveIcon(ObjectiveIconDisplayType displayType, [ ObjVisibility_MinimapAndModel visibility = ObjVisibility_MinimapAndModel, bool displayMinimapArrow = false, bool displayAsCop = false, float additionalHeightOffset = 0.0, int lifeEventType = 0)
# CameraSelect
intptr_t CameraSelect:GetPointer() # CLifeNode_CameraSelect*
void CameraSelect:Activate() : void CameraSelect:Enable()
void CameraSelect:Deactivate() : void CameraSelect:Disable()
LifeActor? CameraSelect:GetTarget() # returns nil if no target is defined
intptr_t CameraSelect:GetTargetPointer()
# Camera
intptr_t Camera:GetPointer() # CLifeActor_Camera*
LifeActor? Camera:GetAttachedActor()
intptr_t Camera:GetAttachedActorPointer()
LifeActor? Camera:GetLookAtActor()
intptr_t Camera:GetLookAtActorPointer()
void Camera:SetPosition(Vector position)
void Camera:SetRotation(Quaternion rotation)
int Camera:hamsterFactoryType()
void Camera:AddObjectiveIcon(ObjectiveIconDisplayType displayType, [ ObjVisibility_MinimapAndModel visibility = ObjVisibility_MinimapAndModel, bool displayMinimapArrow = false, bool displayAsCop = false, float additionalHeightOffset = 0.0, int lifeEventType = 0)
void Camera:RemoveObjectiveIcon(ObjectiveIconDisplayType displayType, [ ObjVisibility_MinimapAndModel visibility = ObjVisibility_MinimapAndModel, bool displayMinimapArrow = false, bool displayAsCop = false, float additionalHeightOffset = 0.0, int lifeEventType = 0)
# Audio
intptr_t Audio:GetPointer() # CLifeNode_PlayAudio*
void Audio:Play() : void Audio:Enable()
void Audio:Stop() : void Audio:Disable()
LifeActor? Audio:GetAttachedActor() # returns nil if not defined
intptr_t Audio:GetAttachedActorPointer()
void Audio:SetBankID(int bankId)
int Audio:GetBankID()
void Audio:SetSampleID(int sampleId)
int Audio:GetSampleID()
void Audio:SetVolume(float volume)
float Audio:GetVolume()
# Viewport
intptr_t Viewport:GetPointer() # CPCViewport*
void Viewport:SetAspectRatio(float aspectRatio)
float Viewport:GetAspectRatio()
void Viewport:SetWidth(float width)
float Viewport:GetWidth()
void Viewport:SetHeight(float height)
float Viewport:GetHeight()
void Viewport:SetWidth(float width)
float Viewport:SetPosition(float fX, float fY) : float Viewport:SetViewportPosition(float fX, float fY)
void Viewport:AddSpriteInstance(int materialId, float x, float y, float sx, float sy, [ int whichSubstance = 0, float topLeftU = 0.0, float topLeftV = 0.0, float bottomRightU = 1.0, float bottomRightV = 1.0, float r = 1.0, float g = 1.0, float b = 1.0, float a = 1.0)
void Viewport:AddStaticInstance(int modelHandle, ELodType modelLOD, Vector rightVec, Vector upVec, Vector forwardVec, Vector position, [ float alpha = 1.0, int whichSubstance = 0, int roomMask = 1, float r = 1.0, float g = 1.0, float b = 1.0)
void Viewport:AddStaticInstance(int modelHandle, ELodType modelLOD, Quaternion rotation, float scale, Vector position, [ float alpha = 1.0, int whichSubstance = 0, int roomMask = 1, float r = 1.0, float g = 1.0, float b = 1.0)
# AICharacterAttack
intptr_t AICharacterAttack:GetPointer() # Life::Node::Character::Attack::Class*
void AICharacterAttack:Activate() : void AICharacterAttack:Enable()
void AICharacterAttack:Deactivate() : void AICharacterAttack:Disable()
LifeActor? AICharacterAttack:GetAttackee()
intptr_t AICharacterAttack:GetAttackeePointer()
LifeActor? AICharacterAttack:GetAttacker()
intptr_t AICharacterAttack:GetAttackerPointer()
void AICharacterAttack:SetAttackee(LifeActor newAttackee)
void AICharacterAttack:SetAttacker(LifeActor newAttacker = nil)