Witam czy dałoby się to jakoś zmienić aby obserwujący widzieli range danej osoby?
Swoją drogą żeby awanse były pisane na sayu?
Gracz %s dostal awans %s.
I pytanko, czemu ten napis nakłada się jeden na drugi (w HUD) w konsekwencji laguje serwer (fpsy spadają dla większości ludzi)
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <fakemeta> #include <csx> #include <ColorChat> #define TASK 666 #define PLUGIN "RangiCSGO" #define VERSION "1.3" #define AUTHOR "klqs" new ranga[33]; new cvar new sync; new const limit = 18; new const limit_min = 1 new const rangi[][] = { {0, "Silver I"}, {5, "Silver II"}, {15, "Silver III"}, {30, "Silver IV"}, {50, "Silver elite"}, {75, "Silver elite master"}, {100, "Gold nova I"}, {150, "Gold nova II"}, {200, "Gold nova III"}, {300, "Gold nova master"}, {500, "Master guardian I"}, {750, "Master guardian II"}, {1000, "Master guardian elite"}, {1500, "Distinguished master guardian"}, {2000, "Legendary eagle"}, {2500, "Legendary eagle master"}, {3000, "Supreme master first class"}, {5000, "THE GLOBAL ELITE"} } new Float:liczby[] = {0.0, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.05, 1.1, 1.15, 1.2, 1.25, 1.3, 1.35} public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /rangi", "menu") sync = CreateHudSyncObj() register_cvar("rangi_kolor", "0") } public client_connect(id) { 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] new stats[8] new body[8] get_user_stats(id, stats, body) if(!is_user_alive(id)) { id = pev(id, pev_iuser2); if(!id) id = param[0] } new Float:kdratio[33] kdratio[id] = float(stats[0]) / float(stats[1]) if((kdratio[id] >= liczby[ranga[id]]) && (stats[0] >= rangi[ranga[id]][0]) && ranga[id] < limit) ranga[id]++ else if(kdratio[id] < liczby[ranga[id]] || stats[0] < rangi[ranga[id]][0]) { if(ranga[id] > limit_min) ranga[id]-- } new name[33] get_user_name(id,name,32) cvar = get_cvar_num("rangi_kolor") switch(cvar) { case 0: { set_hudmessage(255, 255, 255, 0.01, 0.22) ShowSyncHudMsg(id, sync, "[Nick: %s]^n[Ranga: %s]^n[Zabojstwa: %d/%d]^n[K/d ratio %0.2f%]", name , rangi[ranga[id]][1], stats[0], rangi[ranga[id]][0], kdratio[id]) } case 1: { set_hudmessage(255, 0, 0, 0.01, 0.22) ShowSyncHudMsg(id, sync, "[Nick: %s]^n[Ranga: %s]^n[Zabojstwa: %d/%d]^n[K/d ratio %0.2f%]", name , rangi[ranga[id]][1], stats[0], rangi[ranga[id]][0], kdratio[id]) } case 2: { set_hudmessage(0, 255, 0, 0.01, 0.22) ShowSyncHudMsg(id, sync, "[Nick: %s]^n[Ranga: %s]^n[Zabojstwa: %d/%d]^n[K/d ratio %0.2f%]", name , rangi[ranga[id]][1], stats[0], rangi[ranga[id]][0], kdratio[id]) } case 3: { set_hudmessage(0, 0, 255, 0.01, 0.22) ShowSyncHudMsg(id, sync, "[Nick: %s]^n[Ranga: %s]^n[Zabojstwa: %d/%d]^n[K/d ratio %0.2f]", name , rangi[ranga[id]][1], stats[0], rangi[ranga[id]][0], kdratio[id]) } } } public menu(id){ new infomenu[61] new MyMenu = menu_create("Rangi CSGO by klqs", "fMyMenu"); for(new i; i < sizeof(rangi); i++) { format(infomenu, 60, "%s", rangi[i][1], rangi[i][0]) menu_additem(MyMenu, infomenu); } menu_setprop(MyMenu, MPROP_EXITNAME, "Wyjscie"); menu_setprop(MyMenu, MPROP_BACKNAME, "Poprzednia strona"); menu_setprop(MyMenu, MPROP_NEXTNAME, "Nastepna strona"); menu_display(id, MyMenu); } public fMyMenu(id, menu, item) { ColorChat(id, GREEN, "By zdobyc range %s musisz miec %d fragow oraz %0.2f k/d ratio", rangi[item][1], rangi[item][0], liczby[item]) menu_display(id, menu); }