Skip to content

Commit

Permalink
NULL Player fix
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown-gd committed Feb 26, 2024
1 parent d67a016 commit 13f35ab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/autorun/!!!random-patches.yue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CurTime = CurTime
SERVER = SERVER
pairs = pairs

addonName = "Random Patches v5.14.0"
addonName = "Random Patches v5.14.1"

getHookName = ( patchName, hookName ) ->
return addonName .. "::" .. patchName .. ( hookName or "" )
Expand Down Expand Up @@ -320,7 +320,10 @@ do
:Nick = PLAYER

PLAYER.__tostring = =>
return "Player [" .. EntIndex( @ ) .. "][" .. Nick( @ ) .. "]"
if IsValid( @ )
return "Player [" .. EntIndex( @ ) .. "][" .. Nick( @ ) .. "]"

return "[NULL Player]"

ENTITY.IsPlayer = =>
return getmetatable( @ ) == PLAYER
Expand Down

0 comments on commit 13f35ab

Please sign in to comment.