-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.lua
More file actions
68 lines (60 loc) · 1.97 KB
/
client.lua
File metadata and controls
68 lines (60 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(200)
local level = exports["kaves_levelsistemi"]:level()
local exp = exports["kaves_levelsistemi"]:exp()
local player = PlayerPedId()
local health = GetEntityHealth(player) -- male 200 - female 175
local armor = GetPedArmour(player)
local stamina = 100 - GetPlayerSprintStaminaRemaining(PlayerId()) -- 100
local oxygen = GetPlayerUnderwaterTimeRemaining(PlayerId()) -- 40
-- print(health, armor, stamina, oxygen, level, exp)
local death = IsEntityDead(PlayerPedId())
if death then
StartScreenEffect('Dont_tazeme_bro',0,false)
end
SendNUIMessage({
action = "data_emitted",
health = health,
armor = armor,
isDeath = death
})
end
end)
Citizen.CreateThread(function()
while true do
TriggerEvent('esx_status:getStatus', 'hunger', function(hunger)
TriggerEvent('esx_status:getStatus', 'thirst', function(thirst)
TriggerEvent('esx_status:getStatus','stress',function(stress)
local myhunger = hunger.getPercent()
local mythirst = thirst.getPercent()
local mystress = stress.getPercent()
end)
end)
end)
Citizen.Wait(5000)
end
end)
AddEventHandler('playerSpawned', function()
TriggerEvent('skinchanger:getSkin', function(skin)
print(skin.sex)
if skin.sex == 0 then
SendNUIMessage({
action = "gender_emit",
gender = "female"
})
else
SendNUIMessage({
action = "gender_emit",
gender = "male"
})
end
end)
end)