Skip to content

Commit

Permalink
Update functions.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
PickleModifications authored Jan 12, 2025
1 parent 54d4ae7 commit 89c4c67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ exports('GetUserId', GetUserId)
---@param source Source|string source or identifier of the player
---@return Player
function GetPlayer(source)
if type(source) == 'number' then
return QBX.Players[source]
if tonumber(source) ~= nil then
return QBX.Players[tonumber(source)]
else
return QBX.Players[GetSource(source --[[@as string]])]
end
Expand Down Expand Up @@ -551,4 +551,4 @@ function DeleteVehicle(vehicle)
end
end

exports('DeleteVehicle', DeleteVehicle)
exports('DeleteVehicle', DeleteVehicle)

0 comments on commit 89c4c67

Please sign in to comment.