A thinking problem :D
Yeah, i check here if my XP is the nedeed for the next SO
PHP Code:
// The level required XP new const SO[whatever] = { 0, 5, 10, 13, 17, 22, 29, 38, 49, 63, 82, 106, 138, 180, 233, 303, 394, 512, 666, 865, 1125, 1462, 1900, 2300, 2760, 3312, 3957, 4769, 5723, 6868, 8242, 9890, 11868, 14041, 15500, 17800, 20160, 22934, 25000, 27859, 31050, 34707, 37000, 41800, 45369, 50176, 54197, 63000, 70000, 9999999 }
for(new i = 0; i < g_maxplayers; ++i) { new id = i if(g_so[id] < sizeof (SO)) { while (g_xp[id] >= SO[g_so[id]]) { g_so[id]++ static name[32]; get_user_name(id, name, charsmax(name)) zp_colored_print(id, "^x04[Plugin] Yeah, u re on %dth SO", g_so[id]) emit_sound(id, CHAN_ITEM, SoUp, 1.0, ATTN_NORM, 0, PITCH_NORM) } } }
but, how to check when u go down?
eg : XP 18, SO = 5, but i commit suicide and i loose 2 XP, so now my SO should be 4, how to check it?lol
|