new const g_item_name[] = { "Мульти прыжок" }; const g_item_cost = 15; new g_maxJumps = 0; // maximum amount of jumps in mid air. If set to 0 then it is infinitely
// Player buys our upgrade, add one multijump public zp_extra_item_selected(player, itemid) { if (itemid == g_itemid_multijump){ if (g_multijumps[player] < g_maxJumps || !g_maxJumps){ g_multijumps[player]++; if (g_maxJumps) client_print(player, print_center, "Now you can jump %d / %d times in mid air.", g_multijumps[player], g_maxJumps); else client_print(player, print_center, "Now you can jump %d times in mid air.", g_multijumps[player]); } else client_print(player, print_center, "You can't jump more than %d times in mid air!", g_maxJumps); } }
// Reset multijump for all players on newround public EVENT_round_start() { for (new id; id <= 32; id++) g_multijumps[id] = false; }
Сообщение отредактировал Andrey - Вторник, 16.10.2012, 08:07