Witam przerobiłem sobie plugin Kontakt od speedkilla, wszystko działa, kompiluje się, w amx_showrcon amxx list, piszę ,że running, ale wogóle nie reaguje na komendę: /kontakt
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <colorchat> #define PLUGIN "Kontakt" #define VERSION "1.0" #define AUTHOR "speedkill" new Array:g_Names; new Array:g_Numbers; new Array:g_Opisy; public plugin_init(){ register_plugin(PLUGIN, VERSION, AUTHOR); register_clcmd("say /kontakt", "ShowContacts"); } public plugin_cfg(){ //Create array g_Names = ArrayCreate(64, 64); g_Numbers = ArrayCreate(32, 64); g_Opisy = ArrayCreate(64, 64); new g_Path[128]; get_configsdir(g_Path, charsmax(g_Path)); formatex(g_Path, charsmax(g_Path), "%s/kontakt.ini", g_Path); if(file_exists(g_Path)){ //File exists, hurra ! new g_Line[64], g_Name[64], g_Number[32], g_Opis[64], g_Len; for(new i = 0; read_file(g_Path, i, g_Line, charsmax(g_Line), g_Len); i++){ if(g_Len == 0 || !g_Line[0] || g_Line[0] == ';'){ continue; } parse(g_Line, g_Name, charsmax(g_Name), g_Number, charsmax(g_Number), g_Opis, charsmax(g_Opis)); ArrayPushString(g_Names, g_Name); ArrayPushString(g_Numbers, g_Number); ArrayPushString(g_Opisy, g_Opis); } } else{ //Opss ! set_fail_state("Brak pliku kontakt.ini w folderze configs/"); } } public ShowContacts(id){ new g_Name[64], g_Msg[128]; new g_Menu = menu_create("Kontakt do adminow", "MenuChoose"); for(new i = 0; i < ArraySize(g_Names); i++){ ArrayGetString(g_Names, i, g_Name, charsmax(g_Name)); formatex(g_Msg, charsmax(g_Msg), "%s", g_Name); menu_additem(g_Menu, g_Msg); } menu_setprop(g_Menu, MPROP_BACKNAME, "Powrot"); menu_setprop(g_Menu, MPROP_NEXTNAME, "Dalej"); menu_setprop(g_Menu, MPROP_EXITNAME, "Wyjscie"); menu_display(id, g_Menu); } public MenuChoose(id, menu, item){ if(item == MENU_EXIT){ menu_destroy(menu); return PLUGIN_HANDLED; } new g_Name[64], g_Number[32], g_Opis[64]; ArrayGetString(g_Names, item, g_Name, charsmax(g_Name)); ArrayGetString(g_Numbers, item, g_Number, charsmax(g_Number)); ArrayGetString(g_Opisy, item, g_Opis, charsmax(g_Opis)); ColorChat(id, GREEN, "[Kontakt] ^x03%s ^x01Gadu-Gadu: ^x03%s ^x01Funkcja: ^x03%s", g_Name, g_Number, g_Opis); menu_destroy(menu); return PLUGIN_HANDLED; }