Chciałem przerobić klasę "Kameleon" na premium.
Wszystko ładnie zmieniłem w klasie według poradnika, ale jest jeden mały problem.
Gdy chcę dać flagę M,T,N lub z tych podobnych klasa się nie kompiluje.
Błąd:
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team Klon.sma(33) : error 017: undefined symbol "ADMIN_LEVEL_M" 1 Error. Could not locate output file Klon.amxx (compile failed).
A tutaj sma klasy:
#include <amxmodx> #include <amxmisc> #include <codmod> #include <cstrike> #include <ColorChat> #define PLUGIN "Klon" #define VERSION "1.0" #define AUTHOR "CheQ" new const nazwa[] = "Klon"; new const opis[] = "z M4 jest ubrany na Ct, a z AK47 na Terro"; new const bronie = 1<<CSW_M4A1 | 1<<CSW_AK47 ; new const zdrowie = 95; new const kondycja = 2; new const inteligencja = 0; new const wytrzymalosc = 0; new Ubrania_CT[4][]={"sas","gsg9","urban","gign"}; new Ubrania_Terro[4][]={"arctic","leet","guerilla","terror"}; new bool:ma_klase[33]; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); register_event("CurWeapon","CurWeapon","be", "1=1"); } public cod_class_enabled(id) { ColorChat(id, RED, "^x04Klasa^x03 %s^x04 By^x01 amxx.pl", nazwa); //Gdy gracz nie ma flagi wyświetli mu komunikat if(!(get_user_flags(id) & ADMIN_LEVEL_M)) //FLAGA { ColorChat(id, RED, "^x03[%s]^x04 Jest^x03 klasa premium", nazwa) //Znowu info ze przykładowa klasa jest PREMIUM return COD_STOP; } ma_klase[id] = true; return COD_CONTINUE; } public cod_class_disabled(id) ma_klase[id] = false; public CurWeapon(id) { new weapon = read_data(2); new num = random_num(0,3); if(ma_klase[id] && weapon == CSW_M4A1) { cs_set_user_model(id, Ubrania_CT[num]); } if(ma_klase[id] && weapon == CSW_AK47) { cs_set_user_model(id, Ubrania_Terro[num]); } return PLUGIN_CONTINUE; }