hello , why first_player_name is not defined
PHP Code:
callback_playerconnect()
{
.....
self thread checkstatus();
}
PHP Code:
checkstatus()
{
level.brakdanych = &"^1BRAK DANYCH";
players = getentarray("player", "classname");
highexp = undefined;
name = undefined;
highrank = undefined;
for(i = 0; i < players.size; i++)
{
player = players[i];
if(isdefined(player.pers["team"]) && player.pers["team"] == "spectator")
continue;
if(!isdefined(highexp))
{
highexp = player.sexp;
name = player.name;
highrank = player.poziom;
continue;
}
wait 0.01;
if(isDefined(name))
first_player_name = name;
else
first_player_name = level.brakdanych;
if(isDefined(highexp))
first_player_exp = highexp;
else
first_player_exp = level.brakdanych;
if(isDefined(highrank))
first_player_rank = highrank;
else
first_player_rank = level.brakdanych;
wait 3;
players[i] iprintlnbold("name is" + name +"fp name is" + first_player_name);
if(isdefined(first_player_name))
players[i] setClientCvar("first_player", "First Player: Name:" + first_player_name + "His Exp IS:" + first_player_exp + "His rank IS:" + first_player_rank);
else
players[i] setClientCvar("first_player", "First Player: Name:" + "BRAK DANYCH" + "His Exp IS:" +"BRAK DANYCH" + "His rank IS:" + "BRAK DANYCH");
}
}