Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29

Thread: best player map

  1. #21
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by malyczolg View Post
    randal your script almost work ,but script show top3 worst player not the best.
    can u fix it?
    That's because you have no criteria to put any players ahead of others. You need to do something like IznoGod did with his score ranking. After all, that is what you are doing - ranking players. Whether it is XP or score, you need to find something a player has done to make them better than the others, and then use it to place them into position.

  2. #22
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    ok work thanks
    PHP Code:
    array_sort_by_exp(array)
    {
        
    temp = array;

        for (
    0temp.size 1i++)
        {
            for (
    1temp.sizej++)
            {
                if (
    temp].sexp temp].sexp)
                {
                    var = 
    temp];
                    
    temp] = temp];
                    
    temp] = var;
                }
            }
        }

        return 
    temp;


  3. #23
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    PLEASE CLOSE TOPIC

  4. #24
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    No need to close
    timescale 0.01

  5. #25
    Private
    Join Date
    Jun 2013
    Posts
    26
    Thanks
    20
    Thanked 3 Times in 1 Post
    And how to save / load the stats?

  6. #26
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Just search this forum for "openfile"
    timescale 0.01

  7. #27
    Private
    Join Date
    Jun 2013
    Posts
    26
    Thanks
    20
    Thanked 3 Times in 1 Post
    Ye, the openfile, i know for it but it don't work... How to save the PLACES 1, 2, 3. So When the map ends to save the places, and on next map to load them, and to check if the places change and save it again...

  8. #28
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    You just load in player_connect() and save on player_disconnect() and endMap().

    When you say something not worked, what did you actually tried?
    timescale 0.01

  9. #29
    Private
    Join Date
    Jun 2013
    Posts
    26
    Thanks
    20
    Thanked 3 Times in 1 Post
    I tried the same, i just get this error: uninitialised variable 'places'

Posting Permissions

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