Raised This Month: $ Target: $400
 0% 

How should look rank based on array?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
danonix
Senior Member
Join Date: Dec 2012
Old 06-06-2013 , 14:57   How should look rank based on array?
Reply With Quote #1

Hello guys, I was wondering how to do ranks based on arrays, everything about it. I was reading code of animal mod, but it was useless. I don't know how to do it, so I'd like to ask you about it. What should I do there?
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "xXPLUGINXx"
#define VERSION "1.0"
#define AUTHOR "xxxx"

new const FRAGS[] = {
    10,
    20,
    50,
    100,
    500,
    1000,
    8000,
    15000,
}

new const RANKING[] = {
    "Cat",
    "Dog",
    "Car",
    "Pig"
}

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event("DeathMsg", "eDeath", "a");
}

public eDeath(id){
    static stats[8]
    new killer = read_data(1)
    
    if(killer){
        if(stats[0] == FRAGS){ // For example 10
            client_print(id, print_chat, "Advance!");
            
            //* Set player to rank CAT
        }
    }
}
danonix is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode