ChiganS Posted June 6, 2007 Report Share Posted June 6, 2007 Kāds var pateikt kur var dabūt pluginu.... taadu ka uzspiez END un nobano uz noteiktu laiku!?? Link to comment Share on other sites More sharing options...
LiL_Netii Posted June 6, 2007 Report Share Posted June 6, 2007 Shis ir ja 5 reizes uzspied end nobano uz stundu to protams var mainīt... GL #include <amxmodx> #include <amxmisc> #define MAX_WARNINGS 5 new g_iEndUses[33] new enabled, pallow public plugin_init() { register_plugin("No END button","1.0","Throstur") enabled = register_cvar("amx_no-end","1") pallow = register_cvar("amx_no-end_lowaccess","1") // give admins with access "q" immunity to this plugin // register_clcmd("bind ^"end^"","fnNobind") // register_clcmd("bind end","fnNobind") // register_clcmd("unbind ^"end^"","fnNobind") // register_clcmd("unbind end","fnNobind") register_clcmd("nocheaters","fnEND") } public client_putinserver(id) { if(get_pcvar_num(enabled) != 1) return PLUGIN_HANDLED if(access(id,ADMIN_IMMUNITY)) return PLUGIN_HANDLED if((get_pcvar_num(pallow) == 1) && (access(id,ADMIN_LEVEL_D))) return PLUGIN_HANDLED client_cmd(id, "writecfg endbutton") client_cmd(id, "bind ^"END^" ^"nocheaters^"") return PLUGIN_HANDLED } public client_disconnect(id) { client_cmd(id, "exec endbutton.cfg") g_iEndUses[id] = 0 } /* public fnNobind(id) { if((get_pcvar_num(pallow) == 1) && (access(id,ADMIN_LEVEL_D))) return PLUGIN_CONTINUE else if(get_pcvar_num(enabled) == 1) client_cmd(id,"say I'M A FILTHY CHEATER! I TRIED TO CHANGE MY END KEY!!") return PLUGIN_HANDLED } */ public fnEND(id) { if((get_pcvar_num(pallow) == 1) && (access(id,ADMIN_LEVEL_D))) return PLUGIN_CONTINUE else if(get_pcvar_num(enabled) == 1) set_task(0.1,"fnWarnings",id) return PLUGIN_HANDLED } public fnWarnings(id) { new name[32] get_user_name(id,name,31) if(++g_iEndUses[id] > MAX_WARNINGS) { server_cmd("amx_banip 60.0 #%d ^"End-Key^"",get_user_userid(id)) client_print(0,print_chat,"[AMXX] Player %s has been banned for cheating.",name) } client_print(id,print_chat,"[AMXX] Please do not cheat, you have %d warnings left.",MAX_WARNINGS - g_iEndUses[id]) } Link to comment Share on other sites More sharing options...
lazda2 Posted June 7, 2007 Report Share Posted June 7, 2007 a neti kur var nomainiit bana laiku un lai piemeeram peec 2 reizeem nobano!!! sitais ir lai skaitu nomainiitu ja??? #define MAX_WARNINGS 5 Link to comment Share on other sites More sharing options...
shine Posted June 7, 2007 Report Share Posted June 7, 2007 #include <amxmodx> #include <amxmisc> new g_iEndUses[33] new enabled, pallow new bantime, max_warnings public plugin_init() { register_plugin("No END button","1.0","Throstur") enabled = register_cvar("amx_no-end","1") pallow = register_cvar("amx_no-end_lowaccess","1") // give admins with access "q" immunity to this plugin bantime = register_cvar("amx_end_bantime","60") max_warnings = register_cvar("amx_end_max","7") // register_clcmd("bind ^"end^"","fnNobind") // register_clcmd("bind end","fnNobind") // register_clcmd("unbind ^"end^"","fnNobind") // register_clcmd("unbind end","fnNobind") register_clcmd("nocheaters","fnEND") } public client_putinserver(id) { if(get_pcvar_num(enabled) != 1) return PLUGIN_HANDLED if(access(id,ADMIN_IMMUNITY)) return PLUGIN_HANDLED if((get_pcvar_num(pallow) == 1) && (access(id,ADMIN_LEVEL_D))) return PLUGIN_HANDLED client_cmd(id, "writecfg endbutton") client_cmd(id, "bind ^"END^" ^"nocheaters^"") return PLUGIN_HANDLED } public client_disconnect(id) { client_cmd(id, "exec endbutton.cfg") g_iEndUses[id] = 0 } /* public fnNobind(id) { if((get_pcvar_num(pallow) == 1) && (access(id,ADMIN_LEVEL_D))) return PLUGIN_CONTINUE else if(get_pcvar_num(enabled) == 1) client_cmd(id,"say I'M A FILTHY CHEATER! I TRIED TO CHANGE MY END KEY!!") return PLUGIN_HANDLED } */ public fnEND(id) { if((get_pcvar_num(pallow) == 1) && (access(id,ADMIN_LEVEL_D))) return PLUGIN_CONTINUE else if(get_pcvar_num(enabled) == 1) set_task(0.1,"fnWarnings",id) return PLUGIN_HANDLED } public fnWarnings(id) { new name[32] get_user_name(id,name,31) if(++g_iEndUses[id] > get_pcvar_num(max_warnings)) { server_cmd("amx_banip #%d %d ^"End-Key^"",get_user_userid(id), get_pcvar_num(bantime)) client_print(0,print_chat,"[AMXX] Player %s has been banned for cheating.",name) } client_print(id,print_chat,"[AMXX] Please do not cheat, you have %d warnings left.",get_pcvar_num(max_warnings) - g_iEndUses[id]) } kr4 es bi6ku paarveidoju lai butu vieglak izmantot sho pluginu ar: amx_end_bantime ## var maniit bana ilgumu ar: amx_end_max # var mainiit briidinaajumu skaitu Link to comment Share on other sites More sharing options...
esctm Posted June 7, 2007 Report Share Posted June 7, 2007 Labs darbs shine! Noderēs! Link to comment Share on other sites More sharing options...
ChiganS Posted June 7, 2007 Author Report Share Posted June 7, 2007 Paldies....bet kur man sitais jaaliek =]] Link to comment Share on other sites More sharing options...
shine Posted June 7, 2007 Report Share Posted June 7, 2007 Skripts janokompile tie amx_endban_time un tie amxx.cfg vai servera konsole Link to comment Share on other sites More sharing options...
ChiganS Posted June 7, 2007 Author Report Share Posted June 7, 2007 Taa jau domaju .... tnx A ja es izsleedzu servei...tad kad atkal iesleedzu tad atkal jaaieraksta SERVERA CONSULEE.... Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now