AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Abuse = Kick (https://forums.alliedmods.net/showthread.php?t=229546)

m.touqeerafzal 11-09-2013 13:54

[HELP] Abuse = Kick
 
I want this plugin it would be helpful for all...

plugin should detect some specific abusing words from player's chat and on detecting it should kick that player even if he is admin... with the reason "Don't Abuse!!"

If anyone could help, then Plz help...

m.touqeerafzal 11-09-2013 14:29

Re: [HELP] Abuse = Kick
 
I know how to execute kick command on server, but dont know how to detect specific words in user chat...

plz tell me how to check that user chat contains that specific word or not...???

PHP Code:

public KickUser(id)
{
    
server_cmd("kick #%d ^ Don't Abuse^",get_user_userid(id));



simanovich 11-09-2013 16:27

Re: [HELP] Abuse = Kick
 
Hook say && say_team commands

m.touqeerafzal 11-09-2013 16:37

Re: [HELP] Abuse = Kick
 
these commands check that whole sentence should match... but i want to check just abusive words... :(

fysiks 11-09-2013 20:14

Re: [HELP] Abuse = Kick
 
Just use an existing swear plugin. If you want to make something custom, use that plugin as a reference.

m.touqeerafzal 11-10-2013 07:48

Re: [HELP] Abuse = Kick
 
I appreciate you tried to help,

but i didn't get my answer, i don't know how to trigger that kick function... plz help....

fysiks 11-10-2013 13:33

Re: [HELP] Abuse = Kick
 
If you don't know how to do something, you should first search. One part of searching is looking for plugins that already do what you want. For example, admincmd.sma already does this and you can see how it's done.

m.touqeerafzal 11-11-2013 11:47

Re: [HELP] Abuse = Kick
 
i did some work its working fine....


PHP Code:

#include <amxmodx>

public plugin_init() {
    
register_plugin("Abuse","1.0","N e [X] u $")    
    
register_clcmd"say",        "CheckSay" )
    
register_clcmd"say_team",   "CheckSay" )
}

public 
CheckSay(id){
    new 
g_szUserSpeech[32];
    new 
name[32];
    
get_user_name(id,name,31);
    
read_argsg_szUserSpeech[id-1],32);
    
remove_quotes(g_szUserSpeech[id-1]);
    if( 
containig_szUserSpeech[id-1], "fuck" ) > -1)
    {
        
client_print0print_chat"[XTREME-| Server]  Player  %s  Has Been Kicked for Abusing!"name);
        
server_cmd"kick #%d ^"Learn Some Manners of Talking!!!^""get_user_userid(id));
    }


but now i want to increase some functionality.....

1==> abusive word should be in file n it should check that file for matching,

2==> when user say /abuse it should show a MOTD containing abusive words from that file..


some one please help.......

YamiKaitou 11-11-2013 11:56

Re: [HELP] Abuse = Kick
 
You are in Scripting Help, you should be able to do it yourself. Not to mention that plugins like this already exist

fysiks 11-11-2013 12:58

Re: [HELP] Abuse = Kick
 
If you really want to write yet another one of these plugins, you should look at the existing ones for how to do stuff.


All times are GMT -4. The time now is 23:22.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.