API
Server side events
On events
On spawn
Example data
--Example pointData
-- 96 is ID of point
[96] = {
["model"] = rcore_easter_egg_05,
["pos"] = vec3(383.593140, -1828.449097, 27.601067),
["spawnTime"] = 1711301043,
["id"] = 96,
},
}
Example data
AddEventHandler(triggerName("onSpawnPoint"), function(pointData)
--Spawned point
end)
On delete
Example data
--Example point data
pointData = {
["id"] = 106,
["pos"] = vec3(1465.088379, -1890.619873, 70.719093),
}
Example code
AddEventHandler(triggerName("onDeletePoint"), function(pointData)
--Deleted point
end)
On pickup
Example data
--Example pointData
-- 96 is ID of point
[96] = {
["model"] = "rcore_easter_egg_05",
["pos"] = vec3(383.593140, -1828.449097, 27.601067),
["spawnTime"] = 1711301043,
["id"] = 96,
},
}
Example code
AddEventHandler(triggerName("onSelectPoint"), function(playerId, pointData)
--On pickup
end)
Own reward
For this to work go to config and change value to true. If you change this to true our script will not give items to player and it will call server event with playerId, point data and model data where you can find values from config.
Config.UseOwnReward = true
Example data
--Example pointData
pointData = {
["id"] = 96,
["pos"] = vec3(383.593140, -1828.449097, 27.601067),
["spawnTime"] = 1711301043,
["model"] = rcore_easter_egg_05,
}
--Example modelData
modelData = {
["reward"] = {
[1] = {
["name"] = bread,
["count"] = 1,
},
[2] = {
["name"] = water,
["count"] = 1,
},
},
["rewardCount"] = 2,
["model"] = "rcore_easter_egg_05",
}
Example code
AddEventHandler(triggerName("reward"), function(playerId, pointData, modelData)
end)
Last updated
Was this helpful?