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
}
}
}