Raised This Month: $51 Target: $400
 12% 

[HELP] Abuse = Kick


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
m.touqeerafzal
Member
Join Date: May 2013
Old 11-09-2013 , 13:54   [HELP] Abuse = Kick
Reply With Quote #1

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...

Last edited by m.touqeerafzal; 11-09-2013 at 13:55.
m.touqeerafzal is offline
Send a message via Skype™ to m.touqeerafzal
m.touqeerafzal
Member
Join Date: May 2013
Old 11-09-2013 , 14:29   Re: [HELP] Abuse = Kick
Reply With Quote #2

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));


Last edited by m.touqeerafzal; 11-09-2013 at 14:30.
m.touqeerafzal is offline
Send a message via Skype™ to m.touqeerafzal
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 11-09-2013 , 16:27   Re: [HELP] Abuse = Kick
Reply With Quote #3

Hook say && say_team commands
__________________
simanovich is offline
m.touqeerafzal
Member
Join Date: May 2013
Old 11-09-2013 , 16:37   Re: [HELP] Abuse = Kick
Reply With Quote #4

these commands check that whole sentence should match... but i want to check just abusive words...
__________________
N e [X] u $
m.touqeerafzal is offline
Send a message via Skype™ to m.touqeerafzal
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-09-2013 , 20:14   Re: [HELP] Abuse = Kick
Reply With Quote #5

Just use an existing swear plugin. If you want to make something custom, use that plugin as a reference.
__________________
fysiks is offline
m.touqeerafzal
Member
Join Date: May 2013
Old 11-10-2013 , 07:48   Re: [HELP] Abuse = Kick
Reply With Quote #6

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....
__________________
N e [X] u $
m.touqeerafzal is offline
Send a message via Skype™ to m.touqeerafzal
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-10-2013 , 13:33   Re: [HELP] Abuse = Kick
Reply With Quote #7

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.
__________________
fysiks is offline
m.touqeerafzal
Member
Join Date: May 2013
Old 11-11-2013 , 11:47   Re: [HELP] Abuse = Kick
Reply With Quote #8

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.......
__________________
N e [X] u $

Last edited by m.touqeerafzal; 11-11-2013 at 11:47.
m.touqeerafzal is offline
Send a message via Skype™ to m.touqeerafzal
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-11-2013 , 11:56   Re: [HELP] Abuse = Kick
Reply With Quote #9

You are in Scripting Help, you should be able to do it yourself. Not to mention that plugins like this already exist
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-11-2013 , 12:58   Re: [HELP] Abuse = Kick
Reply With Quote #10

If you really want to write yet another one of these plugins, you should look at the existing ones for how to do stuff.
__________________
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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