Results 1 to 10 of 29

Thread: best player map

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by randall View Post
    Because your script is totally wrong. The biggest mistake is the waiting in the 'for' cycle. Try this, it causes the result you'd like to see: (not tested!)
    PHP Code:
    checkStatus()
    {
        
    level.brakdanych "^1BRAK DANYCH";
        
    first = [];
        
    first["player"]    = undefined;
        
    first["name"]    = level.brakdanych;
        
    first["exp"]    = level.brakdanych;
        
    first["rank"]    = level.brakdanych;

        
    players getEntarray("player""classname");
        for (
    0players.sizei++)
        {
            
    player players];

            if (! 
    isDefined(player.pers["team"]) || player.pers["team"] == "spectator")
                continue;

            if (! 
    isDefined(first["player"]) || player.sexp first["exp"])
            {
                
    first["player"] = player;
                
    first["name"] = player.name;
                
    first["exp"] = player.sexp;
                
    first["rank"] = player.poziom;
            }
        }

        for (
    0players.sizei++)
        {
            
    player players];

            
    player setClientCvar("first_player",
                    
    "First Player: Name:" first["name"] +
                    
    " His Exp IS:" first["exp"] +
                    
    " His rank IS:" first["rank"]);
        }

    PHP Code:
    player.sexp first["exp"
    I have only looked at the code casually, but isn't first["exp"] a string (level.brakdanych = "^1BRAK DANYCH")? So, how is the game not throwing an error saying that an int can't be compared to a string?

  2. The Following User Says Thank You to Tally For This Useful Post:

    kung foo man (13th July 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •