Malutki Problem.
Misiatyy<3
28.09.2018
Witam,
Mam mały problem z przerobieniem pluginu tak ,aby kickował gracza ,gdy wpisze 193+ znaków typu "!@#$%^&*()" przed tym niż serwer (nie wiem jak to nazwać) przyjmie to do siebie? Coś takiego. Głównie dlatego ,że przez to serwer dostaję crasha. W kodzie niby jest coś o kickowaniu ,lecz serwer nie kickuje.
Ps.
Nie chcę pisać nowego tematu ,ale zna ktoś być może jakąś stronę AMXX z informacjami co do kodów pluginów ? Chodzi mi o taką stronę ,na której będzie napisane np. właśnie ,gdzie i co wpisać ,aby zkickowało odpowiedniego gracz itd.
Z góry dzięki.
#include <amxmodx> #include <time> #include <amxmisc> new const gBlockcmd[][]= { "#Cstrike_GIGN_Label", "#Cstrike_Spetsnaz_Label", "@ #Cstrike_Spetsnaz_Label", "#1Cstike", "#", "%" } public plugin_init() { register_plugin("Fix bug (say / say_team)", "1.0", "Ghost95V & popeye10 & JazZ."); } public client_command(Client) { static Cmd[6], Said[100]; read_args(Said,99); remove_quotes(Said); read_argv(0,Cmd,5); if(equali(Cmd,"Say_team",3)&&containi(Said,"% ")!=-1){ ColorPrint(Client,"!g[AMXX] !tNo Characters percent allowed !!!"); return 1; } if(equali(Cmd,"Say_team",3)&&containi(Said,"# ")!=-1) { ColorPrint(Client,"!g[AMXX] !tCharacters not allowed !!!"); return 1; } if(equali(Cmd,"Say",3)&&containi(Said,"%")!=-1){ ColorPrint(Client,"!g[AMXX] !tNo Characters percent allowed !!!"); return 1; } if(equali(Cmd,"Say",3)&&containi(Said,"#")!=-1) { ColorPrint(Client,"!g[AMXX] !tCharacters not allowed !!!"); return 1; } return PLUGIN_CONTINUE; } public client_putinserver(id) { if (is_user_connected(id)) { new szName[32]; get_user_name(id, szName, 31); for(new i = 0; i < sizeof(gBlockcmd); i++) { if(containi(szName, gBlockcmd[i]) != -1) { server_cmd("kick #%d ^"Cheat Detected^"", get_user_userid(id)); return 1; } } } return 0; } public client_infochanged(id) { static const name[] = "name"; static szNewName[32], szOldName[32]; get_user_info(id, name, szNewName, 31 ); get_user_name(id, szOldName, 31 ); for(new i = 0; i < sizeof(gBlockcmd); i++){ if(containi(szNewName, gBlockcmd[i]) != -1) { replace_all( szNewName, 32, gBlockcmd[i], "" ); set_user_info(id, name, szNewName ); } } } stock ColorPrint(const id, const input[], any:...) { new count = 1, players[32] static msg[191] vformat(msg, 190, input, 3) replace_all(msg, 190, "!g", "^4") replace_all(msg, 190, "!y", "^1") replace_all(msg, 190, "!t", "^3") replace_all(msg, 190, "!t2", "^0") if (id) players[0] = id; else get_players(players, count, "ch") { for (new i = 0; i < count; i++) { if (is_user_connected(players[i])) { message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]) write_byte(players[i]) write_string(msg) message_end() } } } }
Robiin
28.09.2018
Dostępne jest zabezpieczenie przeciwko wpisywaniu 191+ znaków. Zapoznaj się z tym tematem: https://amxx.pl/topi...ji/#entry740948
Wbudowane (czytaj: gotowe) rozwiązanie masz w wielu pluginach korzystających z eventu wysłania wiadomości napisanych od zeszłego roku.
Misiatyy<3
28.09.2018
Powiem Ci szczerze ,że szukałem wielu takich pluginów i jak na razie nic nie pomogło. Sądzisz ,że wgranie tego ChatFix_SteamUpdate2017.amxx coś pomoże? Serwer jest wywalany nie wtedy ,kiedy ktoś napisze na say normalnie w grze, tylko gdy zbinduje sobie bind "klawisz" "%s%s%s%s%s%s%s%s%s%s%s%..." i użyje klawiszu.
Paweł.
28.09.2018
Powiem Ci szczerze ,że szukałem wielu takich pluginów i jak na razie nic nie pomogło. Sądzisz ,że wgranie tego ChatFix_SteamUpdate2017.amxx coś pomoże? Serwer jest wywalany nie wtedy ,kiedy ktoś napisze na say normalnie w grze, tylko gdy zbinduje sobie bind "klawisz" "%s%s%s%s%s%s%s%s%s%s%s%..." i użyje klawiszu.
Powinno pomóc.
Toldi
28.09.2018
To przerób plugin, który tworzy prefix w say korzystając z tego poradnika: https://amxx.pl/topi...-przed-nickiem/(Kod 1)
_McHappy
28.09.2018
A takie pytanie . Info po śmierci też tworzy prefix tak?
Nie. Informacja jest odpowiednio formatowana i drukowana na czacie.
Misiatyy<3
29.09.2018
Misiatyy<3
30.09.2018
Ktoś jakieś pomysły ma? Mnie już brakuje nerwów... Wydaję mi się ,że to przez jakiś plugin. Tylko JAKI!?
Tutaj Plugins.ini:
; AMX Mod X plugins ; Admin Base - Always one has to be activated amxbans_core.amxx amxbans_main.amxx ;admin.amxx ; admin base (required for any admin-related) ;admin_sql.amxx ; admin base - SQL version (comment admin.amxx) nVaultAdmins.amxx admin_spec_esp.amxx ; Basic admincmd.amxx ; basic admin console commands adminhelp.amxx ; help command for admin console commands adminslots.amxx ; slot reservation multilingual.amxx ; Multi-Lingual management ; Menus menufront.amxx ; front-end for admin menus cmdmenu.amxx ; command menu (speech, settings) ReasonKicker.amxx plmenu.amxx ; players menu (kick, ban, client cmds.) telemenu.amxx ; teleport menu (Fun Module required!) mapsmenu.amxx ; maps menu (vote, changelevel) pluginmenu.amxx ; Menus for commands/cvars organized by plugin ; Chat / Messages adminchat.amxx ; console chat commands antiflood.amxx ; prevent clients from chat-flooding the server scrollmsg.amxx ; displays a scrolling message imessage.amxx ; displays information messages adminvote.amxx ; vote commands ; Map related nextmap.amxx ; displays next map in mapcycle timeleft.amxx ; displays time left on map ; Configuration pausecfg.amxx ; allows to pause and unpause some plugins statscfg.amxx ; allows to manage stats plugins via menu and commands ; Counter-Strike ;restmenu.amxx ; restrict weapons menu statsx.amxx ; stats on death or round end (CSX Module required!) ;miscstats.amxx ; bunch of events announcement for Counter-Strike ;stats_logging.amxx ; weapons stats logging (CSX Module required!) ; Custom - Add 3rd party plugins here ad_manager.amxx afkbombtransfer.amxx Allow_round_finish.amxx bulletdamage.amxx ip.amxx spree.amxx resetscore.amxx rate.amxx ptb.amxx RoundSound.amxx parachute.amxx flash.amxx bs_limiter.amxx Voices_Management.amxx inf_smierc.amxx backweapons.amxx restmenu.amxx skull.amxx afkkisss.amxx Skok.amxx asysta_i_zemsta_fragi.amxx debug SuperVip.amxx realnadedrops.amxx Zegarek.amxx Paka.amxx losowankoo.amxx Vipfree.amxx Skiny.amxx hpk.amxx Map_Spawns_Editor.amxx pref.amxx latka.amxx saycharfix.amxx cs_team_semiclip.amxx
Misiatyy<3
30.09.2018
Problem rozwiązany. Okazało się ,że to przez komendę /vips ,która wyświetlała listę vipów na serwerze. Gdy było ich za dużo po prostu crashowało. Temat do zamknięcia.