ABCD
1
Key:Grand Multiplayer LuaKey:
2
Red Background = Removed | Orange Background = Not Avaliable | Purple = Next Build
For Version Grand Multiplayer 0.1.X
Red Background = Removed | Orange Background = Not Avaliable | Purple = Next Build
3
This is only a tempoary place for the lua functions until our wiki is more complete.
4
ReturnsFunction & ArgsNotes
Wiki Docs Completed
5
Callbacks/Events
6
OnInit()
7
OnClose()
8
OnPlayerConnecting(string uid, string playername)The UID is the players uniqe ID permantly
9
OnPlayerConnected(Player player)
10
OnPlayerDisconnected(Player player, int reason)Reason: 0 = Left, 1 = Timeout, 2 = Kicked, 3 = Banned
11
OnEntityEnterCheckpoint(Checkpoint checkpoint, [Player | Vehicle | Object | NPC] entity)
12
OnEntityExitCheckpoint(Checkpoint checkpoint, [Player | Vehicle | Object | NPC] entity)
13
OnPlayerCommand(Player player, string message)
14
OnPlayerMessage(Player player, string message)
15
OnPlayerShot(Player player, string weapon)
16
OnTick()
17
boolOnEntityDamage([Player | Vehicle | Object | NPC] entity, int damage, [Player | NPC] entity, int weapon)return bool: true = allow server to handle and send damage, false = block server handling damage
18
OnProjectileImpact(Player player, string weapon, table position, [Player | Vehicle | Object | NPC] entity, int entityBone)
19
OnPlayerPickup(Player, Pickup)
20
OnCefFinishLoad(Player)
21
OnCefSendData(Player, string)
22
OnEntityDeath([Player | Vehicle | Object | NPC] entity, [Player | NPC] entityKiller)The killer entity can also be nill
23
24
Events (namespace)
25
Event.AddHandler(string event, function handlerFunction)
26
27
28
World (namespace)
29
int hour, int minute, int secondworld.GetTime()
30
world.SetTime(int hour, int minute, int second)
31
stringworld.GetWeather()
32
world.SetWeather(string weather)
33
world.LoadIPL(string ipl)
34
world.UnloadIPL(string ipl)
35
boolworld.IsGroundSnow()
36
world.SetGroundSnow(bool state)
37
boolworld.IsBlackout()
38
world.SetBlackout(bool state)
39
40
Server (namespace)
41
server.PrintMessage(string message)
42
43
Visual (namespace)
44
visual.ShowNotification(string message, string pic, int icontype, int color, string sender, string subject)
45
visual.SendChatMessage(string message)
46
visual.ShowSubtitle(string message, int duration, bool shownow)
47
48
Entity (namespace)
49
tableentity.GetEntities(int type)Player = 0, NPC, Vehicle, Object, Checkpoint, Pickup, Blip,
50
51
Mysql (namespace)
52
53
boolmysql.Connect(string ip, string username, string password, string database, optional[ int port ])returns true if connection was successful, port is default 3306
54
mysql.Disconnect()
55
table[]{ key, data }mysql.Query(string query)
56
57
Timer (object)
58
timer = Timer()
59
timer:Create(function, int Delay (milseconds), optional[ARGS])
60
timer:Destroy()
61
62
Player (object)
63
user = Player()This is the Object initilizer and user is the holder of this Player Object. user could be bannana for example.
64
intuser.id
65
intuser.type
66
stringuser:GetSecretKey()this is uniqe to that person
67
table{x = float, y = float, z = float}user:GetPosition()Example of the result: {x = 100.2, y = 12.8, z = 16.02}
68
user:SetPosition(float x, float y, float z)
69
user:SetPosition(table{x = float, y = float, z = float})
70
table{x = float, y = float, z = float}user:GetRotation()
71
user:SetRotation(float x, float y, float z)
72
user:SetRotation(table{x = float, y = float, z = float})
73
floatuser:GetViewDistance()This naming may change to LOD or somthing as its the distance this entity will load in for others
74
user:SetViewDistance(float distance)
75
table{drawableid = int, paletteid = int, textureid = int}user:GetPedComponent(int componentid)
76
user:SetPedComponent(int componentid, table{drawableid = int, paletteid = int, textureid = int})
77
table{shapefirst = int, shapesecond = int, shapethird = int, skinfirst = int, skinsecond = int, skinthird = int, shapemix = float, skinmix = float, thirdmix = float}
user:GetPedHeadBlend()
78
user:SetPedHeadBlend(table{shapefirst = int, shapesecond = int, shapethird = int, skinfirst = int, skinsecond = int, skinthird = int, shapemix = float, skinmix = float, thirdmix = float})
79
table{index = int, opacity = float, colortype = int, colorid = int, secondcolorid = int}
user:GetPedHeadOverlay(int overlayid)
80
user:SetPedHeadOverlay(int overlayid, table{index = int, opacity = float, colortype = int, colorid = int, secondcolorid = int})
81
table{drawableid = int, textureid = int}user:GetPedProp(int componentid)
82
user:SetPedProp(int componentid, table{drawableid = int, textureid = int})
83
float scaleuser:GetPedFaceFeature(int feature)
84
user:SetPedFaceFeature(int feature, float scale)
85
stringuser:GetModel()
86
user:SetModel(string model)
87
user:ShowNotification(string message, string pic, int icontype, int color, string sender, string subject)
88
user:LoadIPL(string ipl)
89
user:UnloadIPL(string ipl)
90
user:SendChatMessage(string message)
91
stringuser:GetUsername()
92
user:SetUsername(string name)
93
user:ShowCursor(bool show)
94
user:LoadURL(string url, OPTIONAL[string appcode = "", bool remote = false])
95
user:JavaScriptCall(string call)
96
booluser:IsControllable()
97
user:SetControllable(bool disablecontrols, OPTIONAL[bool frozen = true])
98
stringuser:GetIP()
99
user:Kick(string reason)
100
user:ShowSubtitle(string message, int duration, bool shownow)