Hi,
How to make a difference in LUA between spectators and active players?
Active players or spectators
Micha
(Micha)
#2
et.CS_PLAYERS = 689
function checkteam(client)
local cs = et.trap_GetConfigstring(et.CS_PLAYERS + client)
return tonumber(et.Info_ValueForKey(cs, "t"))
end
x:= 1 for axis, 2 allies, 3 spectator
if checkteam(cno) == x then
or you could use
team = tonumber(et.gentity_get(cno,"sess.sessionTeam"))
if team == x then