Mam taki problem, po włączeniu BH automatycznie podskakuje przy trzymaniu spacji ale postać podskakuje pod samą górę mapki nie mam pojęcia co zrobiłem źle
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #include <hamsandwich> #include <fakemeta> #include <engine> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author" new bool:autobh[33]; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /bh", "ShowMenu"); } public ShowMenu(id) { new menu = menu_create("menu bh", "mh_MyMenu"); menu_additem(menu, "Wlacz", "0"); // case 0 menu_additem(menu, "wyłącz", "1"); // case 1 menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); menu_display(id, menu); return PLUGIN_HANDLED; } public mh_MyMenu(id, menu, item) { if(item == MENU_EXIT) { menu_cancel(id); return PLUGIN_HANDLED; } new command[6], name[64], access, callback; menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback); switch(item) { case 0: { client_print(id, print_chat, "You have selected Wlacz"); for(new i = 1; i <= 32; i++) autobh[i] = true; } case 1: { client_print(id, print_chat, "You have selected wyłącz"); for(new i = 1; i <= 32; i++) autobh[i] = false; } } menu_display(id, menu, 0); return PLUGIN_HANDLED; } public client_PreThink(id) { for(new i = 1; i <= 32; i++) if(autobh[i] == true){ entity_set_float(id, EV_FL_fuser2, 0.0) ; if (entity_get_int(id, EV_INT_button) & 2) { new flags = entity_get_int(id, EV_INT_flags) if (flags & FL_WATERJUMP) return PLUGIN_CONTINUE if ( entity_get_int(id, EV_INT_waterlevel) >= 2 ) return PLUGIN_CONTINUE if ( !(flags & FL_ONGROUND) ) return PLUGIN_CONTINUE new Float:velocity[3] entity_get_vector(id, EV_VEC_velocity, velocity) velocity[2] += 250.0 entity_set_vector(id, EV_VEC_velocity, velocity) entity_set_int(id, EV_INT_gaitsequence, 6) } } return PLUGIN_CONTINUE }
Druga sprawa to chciałbym żeby była tylko jedna opcja w menu: 1.AutoBH - wlaczone i nie wiem jak to ogarnąć
Czy będzie to coś w tym kierunku ?
menu_additem(menu, "AutoBH - \r%s", "0",autobh[i]? wlaczone:wylaczone); // case 0
oraz case 0
{ if(autobh[i] == true) autobh[i] = false else autobh[i] = true }
W tym stylu nie działa lub nie kompiluje się
Użytkownik kimiz edytował ten post 20.10.2013 01:21