Fix GetPlayers() + add GetPercent()

This commit is contained in:
Jérémie N'gadi
2017-08-22 00:58:59 +02:00
parent ba645e080a
commit 6384476016
2 changed files with 15 additions and 10 deletions
+4
View File
@@ -43,6 +43,10 @@ function CreateStatus(xPlayer, name, default, color, visible, tickCallback, clie
end
end
self.getPercent = function()
return (self.val / Config.StatusMax) * 100
end
self.updateClient = function()
TriggerEvent('esx_status:updateClient', self.xPlayer.source)
end