#include #include #include #include #include #define PLUGIN "Ranga" #define VERSION "1.0" #define AUTHOR "spiderman Edit by MxH edit by N1K1Cz" #define TASK 666 #define ADMIN_FLAG ADMIN_LEVEL_H /* TUTAJ WYZEJ ZMIEN FLAGE VIPA NA SWOJA */ new g_TwojeForum; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); g_TwojeForum = register_cvar("hs_forum", "AmxxPro.pl"); register_clcmd("say /rangi", "wywolaj"); } public wywolaj(id){ if(is_user_connected(id)) show_motd(id, "rangi.txt", "Rangi na serwerze"); } public client_connect(id) { if(is_user_bot(id)) return new param[1] param[0] = id set_task(1.0,"rank",TASK+id,param,1,"b") } public client_disconnect(id) if(task_exists(TASK+id)) remove_task(TASK+id) public rank(param[]) { new id = param[0] if(!is_user_alive(id)) { id = pev(id, pev_iuser2); if(!id) id = param[0] } static stats[8], body[8], ranga[33] get_user_stats(id, stats, body) if(stats[0] >= 0 && stats[0] <= 29) { format(ranga, 29, "Unranked"); } else if(stats[0] >= 30 && stats[0] <= 59) { format(ranga, 29, "Silver I"); } else if(stats[0] >= 60 && stats[0] <= 119) { format(ranga, 29, "Silver II"); } else if(stats[0] >= 120 && stats[0] <= 209) { format(ranga, 29, "Silver III"); } else if(stats[0] >= 210 && stats[0] <= 324) { format(ranga, 29, "Silver IV"); } else if(stats[0] >= 325 && stats[0] <= 499) { format(ranga, 29, "Silver Elite"); } else if(stats[0] >= 500 && stats[0] <= 729) { format(ranga, 29, "Silver Elite Master"); } else if(stats[0] >= 730 && stats[0] <= 999) { format(ranga, 29, "Gold Nova I"); } else if(stats[0] >= 1000 && stats[0] <= 1399) { format(ranga, 29, "Gold Nova II"); } else if(stats[0] >= 1400 && stats[0] <= 1849) { format(ranga, 29, "Gold Nova III"); } else if(stats[0] >= 1850 && stats[0] <= 2299) { format(ranga, 29, "Gold Nova Master"); } else if(stats[0] >= 2300 && stats[0] <= 2899) { format(ranga, 29, "Master Guardian I"); } else if(stats[0] >= 2900 && stats[0] <= 3549) { format(ranga, 29, "Master Gurardian III"); } else if(stats[0] >= 4200 && stats[0] <= 4999) { format(ranga, 29, "Master Guardian Elte"); } else if(stats[0] >= 5000 && stats[0] <= 5899) { format(ranga, 29, "Distinguished Master Guardian"); } else if(stats[0] >= 5900 && stats[0] <= 6899) { format(ranga, 29, "Legendary Eagle"); } else if(stats[0] >= 6900 && stats[0] <= 7999) { format(ranga, 29, "Legendary Eagle Master"); } else if(stats[0] >= 8000 && stats[0] <= 9299) { format(ranga, 29, "Supreme Master First Class"); } else if(stats[0] >= 9300 && stats[0] <= 9999) { format(ranga, 29, "The Global Elite"); } else if(stats[0] >= 10000) { format(ranga, 29, "The Global Elite"); } new postep[30] new max_rang = 19 if ( stats[0] >= 0 && stats[0] <= 29) format(postep,29,"1/%i",max_rang) else if ( stats[0] >= 30 && stats[0] <= 59) format(postep,29,"2/%i",max_rang) else if ( stats[0] >= 60 && stats[0] <= 119) format(postep,29,"3/%i",max_rang) else if ( stats[0] >= 120 && stats[0] <= 209) format(postep,29,"4/%i",max_rang) else if ( stats[0] >= 210 && stats[0] <= 324) format(postep,29,"5/%i",max_rang) else if ( stats[0] >= 325 && stats[0] <= 499) format(postep,29,"6/%i",max_rang) else if ( stats[0] >= 500 && stats[0] <= 729) format(postep,29,"7/%i",max_rang) else if ( stats[0] >= 730 && stats[0] <= 999) format(postep,29,"8/%i",max_rang) else if ( stats[0] >= 100 && stats[0] <= 1399) format(postep,29,"9/%i",max_rang) else if ( stats[0] >= 1400 && stats[0] <= 1849) format(postep,29,"10/%i",max_rang) else if ( stats[0] >= 1850 && stats[0] <= 2299) format(postep,29,"11/%i",max_rang) else if ( stats[0] >= 2300 && stats[0] <= 2899) format(postep,29,"12/%i",max_rang) else if ( stats[0] >= 2900 && stats[0] <= 3549) format(postep,29,"13/%i",max_rang) else if (stats[0] >= 4200 && stats[0] <= 4999) format(postep,29,"14/%i",max_rang) else if (stats[0] >= 5000 && stats[0] <= 5899) format(postep,29,"15/%i",max_rang) else if (stats[0] >= 5900 && stats[0] <= 6899) format(postep,29,"16/%i",max_rang) else if (stats[0] >= 6900 && stats[0] <= 7999) format(postep,29,"17/%i",max_rang) else if (stats[0] >= 8000 && stats[0] <= 9299) format(postep,29,"18/%i",max_rang) else if (stats[0] >= 9300 && stats[0] <= 10000000) format(postep,29,"19/%i",max_rang) new name[33] get_user_name(id,name,32) id = param[0] set_hudmessage(255, 255, 255, 0.01, 0.18, 0, 0.01, 1.0, 0.01); show_hudmessage(id, "|>>[Nick: %s]^n|>>[Forum: %s]^n|>>[Konto: %s]^n|>>[Ranga: %s | Fragi: %d]^n|>>[Postep: %s]^n|>>[Menu serwera: /menu]", name, hs_forum(), get_user_flags(id) & ADMIN_FLAG ? "V.I.P" : "Darmowe", ranga, stats[0], postep); }