mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-11-29 10:14:45 +00:00
Hopefully fix the error when charging
I think if you had alot of players, it would overload itself and slip in a nil value when checking for player info This checks if it is a real source number being sent and also adds a slightly delay to help load easier
This commit is contained in:
1 parent
5cc7b60a1f
commit
29b3b2ffb9
1 file changed
+5
-2
@@ -21,8 +21,11 @@ registerCommand("cashregister", {
|
|||||||
createCallback(getScript()..":MakePlayerList", function(source)
|
createCallback(getScript()..":MakePlayerList", function(source)
|
||||||
local onlineList = {}
|
local onlineList = {}
|
||||||
for _, v in pairs(GetPlayers()) do
|
for _, v in pairs(GetPlayers()) do
|
||||||
local Player = getPlayer(v)
|
if v ~= nil or type(v) ~= "number" then
|
||||||
onlineList[#onlineList+1] = { value = tonumber(v), text = "["..v.."] - "..Player.name }
|
local Player = getPlayer(v)
|
||||||
|
onlineList[#onlineList+1] = { value = tonumber(v), text = "["..v.."] - "..Player.name }
|
||||||
|
Wait(10)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return onlineList
|
return onlineList
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in new issue
Block a user