iCore
Search…
⌃K

Events

Client-side events.

iCore:player:created

Same with iCore:player:ready but called only one when player created after signup.

iCore:player:ready

When player join server and ready to play.
RegisterNetEvent('iCore:player:ready')
AddEventHandler('iCore:player:ready', function(playerData)
print('Welcome' .. playerData.name)
end)

iCore:ui:send

Send data to iCore NUI. Same with iCore.ui.send

iCore:ui:copy

Copy string data from game to clipboard. Same with iCore.ui.copy

iCore:vehicle:entering

Player entering vehicle.
RegisterNetEvent('iCore:vehicle:entering')
AddEventHandler('iCore:vehicle:entering', function(entering)
print(json.encode(entering))
end)

iCore:vehicle:entered

Player entered vehicle.
RegisterNetEvent('iCore:vehicle:entered')
AddEventHandler('iCore:vehicle:entered', function(entered)
print(json.encode(entered))
end)

iCore:vehicle:left

Player left vehicle.
RegisterNetEvent('iCore:vehicle:left')
AddEventHandler('iCore:vehicle:left', function(left)
print(json.encode(left))
end)

iCore:media:manage

Manage current media zone.
RegisterNetEvent('iCore:media:manage')
AddEventHandler('iCore:media:manage', function()
SetNuiFocus(true, true)
SetNuiFocusKeepInput(false)
iCore.ui.send({ui = 'media', action = 'manager'})
end)

iCore:media:volume

Set media zone volume.
RegisterNetEvent('iCore:media:volume')
AddEventHandler('iCore:media:volume', function(data)
if mediaZone then
local zone = {}
zone.action = 'update'
zone.zoneId = mediaZone.zoneId
zone.volume = data.volume
TriggerServerEvent('iCore:media:zone', zone)
end
end)

iCore:media:end

Media zone finish the song.
RegisterNetEvent('iCore:media:end')
AddEventHandler('iCore:media:end', function(data)
print(json.encode(data))
end)

iCore:blip:create

Create blip for current player. Same with iCore.blip.create

iCore:keyPress:...

Event fire when you press they key in configs, don't need to put more loop for handle this function. Just enjoy it!
RegisterNetEvent('iCore:keyPress:h')
AddEventHandler('iCore:keyPress:h', function(player)
print(player.name)
end)
RegisterNetEvent('iCore:keyPress:s')
AddEventHandler('iCore:keyPress:s', function(player)
print(player.name)
end)