When a player is joining for first time Player:Alive() returns true. Even if he is a spectator.
For example:
I'm joining on a Server, but the round is already in progress.
If you check if I am alive (with Player:Alive()) it will return true.
But Player:IsSpec() returns also true.
I think that this doesn't make any sense.
But I'm not sure if this is a bug from TTT, GMod or anything else.
Can you tell me what I could do?
(And by the way sorry for my bad english.)
TTT is just like that, do this.
[lua]local PLAYER = FindMetaTable("Player")
function PLAYER:TTTAlive()
return self:Alive() and not self:IsSpec()
end[/lua]
[QUOTE=YourStalker;50352025]TTT is just like that, do this.
[lua]local PLAYER = FindMetaTable("Player")
function PLAYER:TTTAlive()
return self:Alive() and not self:Spec()
end[/lua][/QUOTE]
[url=https://github.com/garrynewman/garrysmod/blob/451b4ff5d1aea7b9b06a8024ef706c248a79647e/garrysmod/gamemodes/terrortown/gamemode/player_ext_shd.lua#L9]self:IsSpec()[/url]
not self:Spec()
Sorry, you need to Log In to post a reply to this thread.