So I’m trying to make a native where whenever someone joins my server it sets their HP to 200 instead of the 150 HP that it gives you. I’ve tried a couple of stuff and this error keeps popping up.
SCRIPT ERROR: @health/cl_health.lua:4: attempt to call a nil value (global ‘SetPlayerHealth’)
I’ve searched the Forums and I can’t find any information regarding this so I’ll just leave this here and hope someone helps.
The script/resource that I’ve made is this:
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
SetPlayerHealth(GetPlayerPed(-1), 200.0)
end
end)