/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <cstrike> #include <hamsandwich> #include <fakemeta_util> #define PLUGIN "Free" #define VERSION "1.0" #define AUTHOR "peku33" new bool:g_voted; new bool:g_free; new odp_t, odp_n; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_logevent("Poczatek_Rundy", 2, "1=Round_Start"); register_clcmd("say /free", "cmd_free"); RegisterHam(Ham_Use, "func_button", "event_use"); register_event("CurWeapon","CurWeapon","be", "1=1"); } public CurWeapon(id) { if(is_user_connected(id) && is_user_alive(id) && !g_free && cs_get_user_team(id) == CS_TEAM_T) { if(get_user_weapon(id) != CSW_KNIFE) { fm_strip_user_weapons(id); fm_give_item(id, "weapon_knife"); } } } public event_use(id) { return g_free ? HAM_HANDLED : HAM_IGNORED; } public Poczatek_Rundy() { g_voted = false; g_free = false; } public cmd_free(id) { if(is_user_connected(id)) { if(is_user_alive(id)) { switch(cs_get_user_team(id)) { case CS_TEAM_CT: { start_vote(); } case CS_TEAM_T: { g_free = true; g_voted = true; } default: { client_print(id, print_chat, "Nie mozesz glosowac"); } } } else { client_print(id, print_chat, "Musisz byc zywy"); } } } public start_vote() { if(g_voted == true || task_exists(999)) { return; } g_voted = true; new menu = menu_create("Free?", "vote_handle"); odp_t = 0; odp_n = 0; menu_additem(menu, "Tak"); menu_additem(menu, "Nie"); menu_setprop(menu, MPROP_EXIT, MEXIT_NEVER); for(new i = 1; i <= 32; i++) { if(is_user_connected(id) && is_user_alive(id)) { menu_display(id, menu); } } set_task(10.0, "end_vote", 999); } public vote_handle(id, menu, item) { menu_destroy(menu); switch(item) { case 0: { odp_t++; } case 1: { odp_n++; } } } public end_vote() { if(odp_t > odp_n) { g_free = true; client_print(0, print_chat, "Free wygrywa."); } else { client_print(0, print_chat, "Free przegrywa."); } } }
i tu problem wyskakuje : jak kompiluje
/tmp/textEjR8d2.sma(89) : error 017: undefined symbol "id"
/tmp/textEjR8d2.sma(91) : error 017: undefined symbol "id"
/tmp/textEjR8d2.sma(91) : warning 215: expression has no effect
/tmp/textEjR8d2.sma(91) : error 001: expected token: ";", but found ")"
/tmp/textEjR8d2.sma(91) : error 029: invalid expression, assumed zero
/tmp/textEjR8d2.sma(91) : fatal error 107: too many error messages on one line
Compilation aborted.
5 Errors.
POMOZECIE TO ZOROBIC ZEBY SIE SKOMPILWOALO !? + BEDZIE!