enum { PLATFORM, BUNNYHOP, DAMAGE, HEALER, NO_FALL_DAMAGE, ICE, TRAMPOLINE, SPEED_BOOST, DEATH, HONEY, CT_BARRIER, T_BARRIER, GLASS, NO_SLOW_DOWN_BUNNYHOP, DELAYED_BUNNYHOP, INVINCIBILITY, STEALTH, BOOTS_OF_SPEED, TOTAL_BLOCKS }; new const g_block_names[TOTAL_BLOCKS][] = { "Platforma", "Bunnyhop", "Obrazenia", "Leczenie", "Brak obrazen po upadku", "Lod", "Trampolina", "Przyspieszenie", "Smierc", "Miod", "Bariera CT", "Bariera TT", "Szyba", "Bunnyhop bez spowolnienia", "Opozniony bunnyhop", "Niesmiertelnosc", "Niewidzialnosc", "Buty Szybkosci" }; new const g_property1_name[TOTAL_BLOCKS][] = { "", "Brak obrazen po upadku", "Obrazen na odstep czasu", "Odstep czasu", "", "", "Predksoc w gore", "Predkos w przod", "", "Predkosc na miodzei", "", "", "", "Brak obrazen po upakdu", "Czas zanim zniknie", "Czas niesmiertelnosci", "Czas niewidzialnosci", "Czas butow nzybkosci" }; new const g_property1_default_value[TOTAL_BLOCKS][] = { "", "0", "5", "1", "", "", "500", "1000", "", "75", "", "", "", "0", "1", "10", "10", "10" }; new const g_property2_name[TOTAL_BLOCKS][] = { "", "", "Zycia na odstep czasu", "Odstep czasu", "", "", "", "Predkosc w gore", "", "", "", "", "", "", "", "Nastepne uzycie", "Nastepne uzycie", "Nastepne uzycie" }; new const g_property2_default_value[TOTAL_BLOCKS][] = { "", "", "0.5", "0.5", "", "", "", "200", "", "", "", "", "", "", "", "60", "60", "60" }; new const g_property3_name[TOTAL_BLOCKS][] = { "", "Przezroczystosc", "Przezroczystosc", "Przezroczystosc", "Przezroczystosc", "Przezroczystosc", "Przezroczystosc", "Przezroczystosc", "Przezroczystosc", "Przezroczystosc", "Przezroczystosc", "Przezroczystosc", "", "Przezroczystosc", "Przezroczystosc", "", "", "Predkosc" }; new const g_property3_default_value[TOTAL_BLOCKS][] = { "", "255", "255", "255", "255", "255", "255", "255", "255", "255", "255", "255", "", "255", "255", "", "", "400" }; new const g_property4_name[TOTAL_BLOCKS][] = { "", "Tylko od gory", "Tylko od gory", "Tylko od gory", "", "", "Tylko od gory", "Tylko od gory", "Tylko od gory", "Tylko od gory", "Tylko od gory", "Tylko od gory", "", "Tylko od gory", "Tylko od gory", "Tylko od gory", "Tylko od gory", "Tylko od gory" }; new const g_property4_default_value[TOTAL_BLOCKS][] = { "", "0", "1", "1", "", "", "0", "0", "1", "0", "0", "0", "", "0", "0", "1", "1", "1" }; public HandlePropertiesMenu(id, key) { new ent = g_property_info[id][1]; if ( !is_valid_ent(ent) ) { BCM_Print(id, "Ten blok zostal usuniety!"); g_viewing_properties_menu[id] = false; ShowBlockMenu(id); return PLUGIN_HANDLED; } new block_type = entity_get_int(ent, EV_INT_body); switch ( key ) { case K1: { if ( g_property1_name[block_type][0] ) { g_property_info[id][0] = 1; } else if ( g_property2_name[block_type][0] ) { g_property_info[id][0] = 2; } else if ( g_property3_name[block_type][0] ) { g_property_info[id][0] = 3; } else { g_property_info[id][0] = 4; } if ( g_property_info[id][0] == 1 && ( block_type == BUNNYHOP || block_type == NO_SLOW_DOWN_BUNNYHOP ) ) { ToggleProperty(id, 1); } else if ( g_property_info[id][0] == 4 ) { ToggleProperty(id, 4); } else { BCM_Print(id, "Wpisz nowa wartosc dla tej opcji.%s", g_property_info[id][0] == 3 && block_type != BOOTS_OF_SPEED ? "^1 0^3 o^1 255^3 wylaczy przezroczysosc." : g_blank); client_cmd(id, "messagemode BCM_SetProperty"); } } case K2: { if ( g_property1_name[block_type][0] && g_property2_name[block_type][0] || g_property1_name[block_type][0] && g_property3_name[block_type][0] || g_property1_name[block_type][0] && g_property4_name[block_type][0] || g_property2_name[block_type][0] && g_property3_name[block_type][0] || g_property2_name[block_type][0] && g_property4_name[block_type][0] || g_property3_name[block_type][0] && g_property4_name[block_type][0] ) { if ( g_property1_name[block_type][0] && g_property2_name[block_type][0] ) { g_property_info[id][0] = 2; } else if ( g_property1_name[block_type][0] && g_property3_name[block_type][0] || g_property2_name[block_type][0] && g_property3_name[block_type][0] ) { g_property_info[id][0] = 3; } else { g_property_info[id][0] = 4; } if ( g_property_info[id][0] == 4 ) { ToggleProperty(id, 4); } else { BCM_Print(id, "Wpisz nowa wartosc dla tej opcji.%s", g_property_info[id][0] == 3 && block_type != BOOTS_OF_SPEED ? "^1 0^3 i^1 255^3 wylaczy przezroczystosc." : g_blank); client_cmd(id, "messagemode BCM_SetProperty"); } } } case K3: { if ( g_property1_name[block_type][0] && g_property2_name[block_type][0] && g_property3_name[block_type][0] || g_property1_name[block_type][0] && g_property2_name[block_type][0] && g_property4_name[block_type][0] || g_property1_name[block_type][0] && g_property3_name[block_type][0] && g_property4_name[block_type][0] || g_property2_name[block_type][0] && g_property3_name[block_type][0] && g_property4_name[block_type][0] ) { if ( g_property1_name[block_type][0] && g_property2_name[block_type][0] && g_property3_name[block_type][0] ) { g_property_info[id][0] = 3; } else { g_property_info[id][0] = 4; } if ( g_property_info[id][0] == 4 ) { ToggleProperty(id, 4); } else { BCM_Print(id, "Wpisz nowa wartosc dla tej opcji.%s", g_property_info[id][0] == 3 && block_type != BOOTS_OF_SPEED ? "^1 0^3 i^1 255^3 wylaczy przezroczystosc." : g_blank); client_cmd(id, "messagemode BCM_SetProperty"); } } } case K4: { if ( g_property1_name[block_type][0] && g_property2_name[block_type][0] && g_property3_name[block_type][0] && g_property4_name[block_type][0]) { ToggleProperty(id, 4); } } case K0: { g_viewing_properties_menu[id] = false; ShowBlockMenu(id); } } if ( key != K0 ) ShowPropertiesMenu(id, ent); return PLUGIN_HANDLED; } ToggleProperty(id, property) { new ent = g_property_info[id][1]; if ( !is_valid_ent(ent) ) { BCM_Print(id, "Ten blok zostal usuniety."); g_viewing_properties_menu[id] = false; ShowBlockMenu(id); return PLUGIN_HANDLED; } static property_value[5]; GetProperty(ent, property, property_value); SetProperty(ent, property, property_value); for ( new i = 1; i <= g_max_players; i++ ) { if ( g_connected[i] && g_viewing_properties_menu[i] ) { ent = g_property_info[i][1]; ShowPropertiesMenu(i, ent); } } return PLUGIN_HANDLED; } BCM_Print(id, const message_fmt[], any:...) { static i; i = id ? id : GetPlayer(); if ( !i ) return; static message[256], len; len = formatex(message, charsmax(message), "^4[%s %s]^3 ", PLUGIN_PREFIX, PLUGIN_VERSION); vformat(message[len], charsmax(message) - len, message_fmt, 3); message[192] = 0; static msgid_SayText; if ( !msgid_SayText ) msgid_SayText = get_user_msgid("SayText"); static const team_names[][] = { "", "TERRORIST", "CT", "SPECTATOR" }; static team; team = get_user_team(i); TeamInfo(i, id, team_names[0]); message_begin(id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, msgid_SayText, _, id); write_byte(i); write_string(message); message_end(); TeamInfo(i, id, team_names[team]); }