Copy --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 ,
},
}
Copy AddEventHandler ( triggerName ( "onSpawnPoint" ), function ( pointData )
--Spawned point
end )
Copy --Example point data
pointData = {
[ "id" ] = 106 ,
[ "pos" ] = vec3 ( 1465.088379 , - 1890.619873 , 70.719093 ),
}
Copy AddEventHandler ( triggerName ( "onDeletePoint" ), function ( pointData )
--Deleted point
end )
Copy --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 ,
},
}
Copy AddEventHandler ( triggerName ( "onSelectPoint" ), function ( playerId , pointData )
--On pickup
end )
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.
Copy Config.UseOwnReward = true
Copy --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" ,
}
Copy AddEventHandler ( triggerName ( "reward" ), function ( playerId , pointData , modelData )
end )