NemeSyS17 5 Posted April 4, 2017 Share Posted April 4, 2017 Nume : amx_blind Versiune : - Descriere detaliata : Vreau un plugin amx_lind care sa iid e-a ban automat dupa frag [ Ban permanent ] Link to comment Share on other sites More sharing options...
NemeSyS17 5 Posted April 5, 2017 Author Share Posted April 5, 2017 UP! 1 Link to comment Share on other sites More sharing options...
NemeSyS17 5 Posted April 6, 2017 Author Share Posted April 6, 2017 UP ! Link to comment Share on other sites More sharing options...
adry 1,913 Posted April 7, 2017 Share Posted April 7, 2017 #include <amxmodx> #include <amxmisc> #include <fakemeta_util> #include <fun> #include <engine> #define CMDTARGET_BLIND (CMDTARGET_OBEY_IMMUNITY|CMDTARGET_ALLOW_SELF|CMDTARGET_NO_BOTS) new DirectorServer[64], TextServer[32], LimbaServer = 31,r,t, FisierServer[128], SalvareServer, bool:g_bBlind[33], gmsgScreenFade, amx_show_activity, admin[33] new kills[33] = {0,...}; static const poza[] = "http://RangFort.Ro/forum" public plugin_init() { register_plugin("RedDEvil blind", "1.0", "leavegame") gmsgScreenFade = get_user_msgid("ScreenFade") register_event("ScreenFade", "Event_ScreenFade", "b") register_event("DeathMsg","hook_death","a"); register_concmd("amx_blind","cmdBlind", ADMIN_KICK, "- >nume sau #userid< -") register_concmd("amx_unblind","cmdUnblind", ADMIN_KICK, "- >nume sau #userid< -") if( !(amx_show_activity = get_cvar_pointer("amx_show_activity")) ) { amx_show_activity = register_cvar("amx_show_activity","0") } } public client_putinserver(id) { g_bBlind[id] = false } public cmdBlind(id, level, cid) { if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED new arg[32] read_argv(1, arg, 31) new user = cmd_target(id, arg, CMDTARGET_BLIND) if(!user) return PLUGIN_HANDLED new name2[32], name[32], ip[32] get_user_name(id, name, 31) get_user_name(user, name2, 31) get_user_ip(user, ip, 31, 1) admin[ user ] = id; if(g_bBlind[user]) { console_print(id, "Jucatorul ^"%s^" are deja blind", name2) return PLUGIN_HANDLED } else { g_bBlind[user] = true Fade_To_Black(user) } console_print(id, "Jucatorul ^"%s^" cu ip: ^"%s^" a primit blind", name2, ip) client_cmd(id,"amx_chat ^"%s^" a primit blind", name2) kills[user]=0 return PLUGIN_HANDLED } public cmdUnblind(id, level, cid) { if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED new arg[32] read_argv(1, arg, 31) new user = cmd_target(id, arg, CMDTARGET_BLIND) if(!user) return PLUGIN_HANDLED new name2[32], name[32], ip[32] get_user_name(id, name, 31) get_user_name(user, name2, 31) get_user_ip(user, ip, 31, 1) if(g_bBlind[user]) { g_bBlind[user] = false Reset_Screen(user) } else { console_print(id, "Client ^"%s^" is already unblind", name2) return PLUGIN_HANDLED } switch(get_pcvar_num(amx_show_activity)) { } console_print(id, "Jucatorul ^"%s^" cu ip: ^"%s^" a primit unblind", name2, ip) client_cmd(id,"amx_chat ^"%s^" a primit unblind", name2) kills[id]=0; return PLUGIN_HANDLED } public Event_ScreenFade(id) { if(g_bBlind[id]) { Fade_To_Black(id) } } Fade_To_Black(id) { message_begin(MSG_ONE_UNRELIABLE, gmsgScreenFade, _, id) write_short((1<<3)|(1<<8)|(1<<10)) write_short((1<<3)|(1<<8)|(1<<10)) write_short((1<<0)|(1<<2)) write_byte(255) write_byte(255) write_byte(255) write_byte(255) message_end() } Reset_Screen(id) { message_begin(MSG_ONE_UNRELIABLE, gmsgScreenFade, _, id) write_short(1<<2) write_short(0) write_short(0) write_byte(0) write_byte(0) write_byte(0) write_byte(0) message_end() } public hook_death(id) { new fo_logfile[64],timp[64],maxtext[256] new numeserver [64], numeadmin[32], numevictima[32], numeblindat[32], ipadmin[32], ipcodat [32], admini[33] new killer = read_data(1); new victim = read_data(2); if(g_bBlind[killer]&&killer!=victim&&kills[killer]<4){ kills[killer]++; if ( get_user_flags(id) & ADMIN_IMMUNITY ){ set_hudmessage(255,255,0,0.47,-0.55,0,6.0,12.0,0.1,0.2,1) show_hudmessage(id, "Jucatorul %s a Facut %i frag(uri) dupa blind.^nFURIENWATF.RANGFORT.RO", numeblindat, kills[killer]);} if(kills[killer]>=2) client_cmd(0, "spk ^"vox/bizwarn coded user apprehend^"");} get_user_name(admin[killer], numeadmin, 31) get_user_name(killer, numeblindat, 31) get_user_name(victim, numevictima, 31) get_user_ip(admin[killer], ipadmin, 31, 1) get_user_ip(killer, ipcodat, 31, 1) get_cvar_string("hostname",numeserver,63); get_configsdir(fo_logfile, 63) get_time("%m/%d/%Y - %H:%M:%S",timp,63) if(g_bBlind[killer]&&kills[killer]>=3) { IncarcareServer() ScriereServer() set_hudmessage(255,255,0,0.47,-0.55,0,6.0,12.0,0.1,0.2,1) show_hudmessage(0, "FRAG DUPA BLIND^nRESPECTA SI VEI FI RESPECTAT.^nEsti al %i`lea nemernic turnat.^nSperam ca te-ai lecuit.^nFURIENWATF.RANGFORT.RO", SalvareServer) client_cmd(0, "spk ^"vox/bizwarn coded user apprehend^"") format(maxtext, 255, "[Red] %s -> ADMIN: %s %s CODAT: %s %s ",timp,numeadmin,ipadmin,numeblindat,ipcodat) format(fo_logfile, 63, "%s/fragdupablind.txt", fo_logfile) for (new i = 0; i < 32; ++i) { if ( access(admini,ADMIN_CHAT) ) client_print(admini,print_chat,"FURIENWATF.RANGFORT: Jucatorul %s a facut frag dupa blind-ul dat de %s",killer,admin[killer]) } write_file(fo_logfile,maxtext,-1) client_print(killer, print_chat, "* FRAG DUPA BLIND by %s", poza) client_print(killer, print_chat, "* Poza facuta pe : %s",numeserver) client_print(killer, print_chat, "* Nume codat: ^"%s^" cu IP: %s",numeblindat,ipcodat) client_print(killer, print_chat, "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin) client_print(killer, print_chat, "* Data : %s",timp) client_print(killer, print_chat, "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) client_cmd(killer,"wait;snapshot") console_print(killer, "* FRAG DUPA BLIND by %s", poza) console_print(killer, "* Poza facuta pe : %s",numeserver) console_print(killer, "* Nume codat: ^"%s^" cu IP: %s",numeblindat,ipcodat) console_print(killer, "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin) console_print(killer, "* Data : %s",timp) console_print(killer, "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) client_cmd(killer,"wait;snapshot") console_print(admin[killer], "* FRAG DUPA BLIND by %s", poza) console_print(admin[killer], "* Poza facuta pe : %s",numeserver) console_print(admin[killer], "* Nume codat: ^"%s^" cu IP: %s",numeblindat,ipcodat) console_print(admin[killer], "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin) console_print(admin[killer], "* Data : %s",timp) console_print(admin[killer], "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) client_cmd(admin[killer],"wait;snapshot") client_cmd( admin[killer], "amx_leavegame %s", killer) client_cmd( admin[killer], "amx_addban %s 999999 ^"FRAG DUPA BLIND^"", ipcodat ); } } stock IncarcareServer() { get_configsdir(DirectorServer, 63) format(FisierServer,127,"%s/fragdupablind.q",DirectorServer) if (!file_exists(FisierServer)){ return PLUGIN_HANDLED } else { read_file(FisierServer,0,TextServer,LimbaServer,r) SalvareServer = str_to_num(TextServer) } return PLUGIN_CONTINUE } stock ScriereServer() { get_configsdir(DirectorServer, 63) format(FisierServer,127,"%s/fragdupablind.q",DirectorServer) if (!file_exists(FisierServer)) { return PLUGIN_HANDLED } else { read_file(FisierServer,0,TextServer,LimbaServer,t) SalvareServer = str_to_num(TextServer) SalvareServer = SalvareServer + 1 format(TextServer,31,"%i",SalvareServer) delete_file(FisierServer) write_file(FisierServer,TextServer,-1) } return PLUGIN_CONTINUE } Link to comment Share on other sites More sharing options...
NemeSyS17 5 Posted April 7, 2017 Author Share Posted April 7, 2017 Rezolvat , mersi ! Link to comment Share on other sites More sharing options...
Skadi 442 Posted April 7, 2017 Share Posted April 7, 2017 Closed. Link to comment Share on other sites More sharing options...
Recommended Posts