chodzi mi o ten kod, czy on bedzie poprawnie dzialal, znalazlem tam kilka kodow, kilku skrypterow sprzeczalo sie ze soba jak to zrobic wiec postanowilem zadac ponownie pytanie w dziale "Pytania" o to kod:
#include <amxmodx> public plugin_init(){ register_plugin("Stock", "0.1a", "diablix"); if(!is_allowed_server("123.456.7890:12345")){ server_cmd("echo Plugin Stock dziala tylko na jednym serwerze.. Bye"); server_cmd("shutdownserver"); } } stock is_allowed_server(const current_ip[]){ new server_ip[22]; get_user_ip(0, server_ip, charsmax(server_ip)); if(equali(current_ip, server_ip)) return true; return false; }
Czy bedzie dzialal on prawidlowo tylko na jedno IP? Chce sprzedac swoj unikalny plugin, a nie chce zeby byl on dostepny dla wszystkich , troche nad nim pracowalem
czy dobrze to zapisalem? o to fragment kodu:
#include <amxmodx> #include <amxmisc> #define PLUGIN "Fun" #define VERSION "1.0" #define AUTHOR "YoYo" #define TASKID 6892 new const g_Files[][64] = { "resource/yeya.xx" }; new g_x, g_y33], bool:z[33] public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("ey", "eys") g_CvarEnabled = register_cvar("amx_xza, "1") register_cvar("amx_yy1", "") register_cvar("amx_yy2", "") register_cvar("amx_xx1", "") register_cvar("amx_xx2", "") if(!is_allowed_server("123.456.7890:12345")){ server_cmd("echo Ten plugin dziala tylko na jednym serwerze!"); server_cmd("shutdownserver"); } } stock is_allowed_server(const current_ip[]){ new server_ip[22]; get_user_ip(0, server_ip, charsmax(server_ip)); if(equali(current_ip, server_ip)) return true; return false; }
Oczywiscie podane przezemnie zmienne sa zmyslone, pytam tylko czy poprawnie ? czy innaczej to zrobic?
Użytkownik Scripting edytował ten post 17.12.2011 16:29