Nie zbyt ogarniam, .sma, ale gdyby ktoś mógł powiedzieć co źle to bym był bardzo wdzięczny.
#include #include #define TASK_GENERAL 100 #define TASK_KICK 200 new const rules[] = "rules.txt"; public plugin_init() { register_plugin("Terms and Agreements","0.20","DahVid/Avalanche"); register_menucmd(register_menuid("rules_menu"),"9999999999","RulesMenu"); set_task(1.0,"checkforfiles"); } public checkforfiles() { if(!file_exists(rules)) write_file(rules,"/cstrike/addons/amxmodx/configs/") } public client_putinserver(id) { remove_task(TASK_GENERAL+id); remove_task(TASK_KICK+id); if(is_user_bot(id)) return; set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id); } public client_disconnect(id) { remove_task(TASK_GENERAL+id); remove_task(TASK_KICK+id); } public DisplayRulesMenu(taskid) { new id = taskid-TASK_GENERAL; static szMenuBody[256]; if(!szMenuBody[0]) { new len = format(szMenuBody,255,"Regulamin Serwera:^n"); len += format(szMenuBody[len],255-len,"^n7. Akceptuje"); len += format(szMenuBody[len],255-len,"^n8. Odmawiam"); len += format(szMenuBody[len],255-len,"^n^n9. Pokaz Regulamin"); } new keys = MENU_KEY_7|MENU_KEY_8|MENU_KEY_9; show_menu(id,keys,szMenuBody,-1,"rules_menu"); } public RulesMenu(id,key) { switch(key) { case 6: { client_print(id,print_chat,"* Dziekujemy!"); } case 7: { server_cmd("kick #%i ^"Nie zaakceptowales Regulaminu!^"",get_user_userid(id)); } case 8: { client_print(id,print_chat,"* proszę uwaznie przeczytac regulamin!"); show_motd(id,rules,"SERVER RULES"); set_task(5.0,"DisplayRulesMenu",TASK_GENERAL+id); } } }