Hello guys im fetching vip status like yes or not and vipskin model from database its ok i get these 2 variable.But then im trying to trigger a eventhandler on skinchanger and then define variables there.But seems like its not sending variables do there and not working where is problem in my code?
On the top of script i define these local vippy and local model and then
ESX.TriggerServerCallback('esx_skin:getPlayervip', function(vipstatus, vipmodel)
if vipstatus then
vippy = true
model = vipmodel
end
TriggerEvent('skinchanger:vipskin', vippy, model)
end)
Trying to define variables in skinchanger
RegisterNetEvent('skinchanger:vipskin')
AddEventHandler('skinchanger:vipskin', function(vip, vipmodel)
if vip then
vipcheck = true
vipskin = vipmodel
end
end)
of course there is vipcheck=true and vipskin=’ ’ on top of page
but my code still not running like it can’t get vipskin data but its getting vip if true or not
Sorry for bad english.