// Where are we putting this player?
if(destination == "spec" || destination == "spectator")
{
- if(client.classname != "spectator" && client.classname != "observer")
+ if(!IS_SPEC(client) && !IS_OBSERVER(client))
{
self = client;
PutObserverInServer();
}
else
{
- if(client.classname != "spectator" && client.classname != "observer")
+ if(!IS_SPEC(client) && !IS_OBSERVER(client))
{
if(teamplay)
{
entity plr;
FOR_EACH_CLIENT(plr) //give every spectator <g_maxplayers_spectator_blocktime> seconds time to become a player
{
- if(plr.classname == "spectator" || plr.classname == "observer")
+ if(IS_SPEC(plr) || IS_OBSERVER(plr))
{
plr.spectatortime = time;
sprint(plr, strcat("^7You have to become a player within the next ", ftos(autocvar_g_maxplayers_spectator_blocktime), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n"));