Raised This Month: $ Target: $400
 0% 

[REQ] Small and simple plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DIS
Senior Member
Join Date: Jul 2013
Location: Somewhere Here xD
Old 07-18-2013 , 13:25   [REQ] Small and simple plugin
Reply With Quote #1

I need a simple plugin that when user says something defined in the SMA file, it executes a command in server_cmd. Lets say a player says "hello". Now this command executes in server_cmd: amx_banip "%s" "1440" "Said hello" (Put his name instead of %s).
Can someone make this plugin? I can replace the hello thing with the thing I need in the SMA file.
Any help would be greatly appreciated
Thanks
DIS is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 07-18-2013 , 17:04   Re: [REQ] Small and simple plugin
Reply With Quote #2

I don't understand your request, just search this keyword (without edititng it) only in titles: *command*
examples:Say Commands, Custom Say Commands
__________________
ANTICHRISTUS is offline
DIS
Senior Member
Join Date: Jul 2013
Location: Somewhere Here xD
Old 07-19-2013 , 12:26   Re: [REQ] Small and simple plugin
Reply With Quote #3

Quote:
Originally Posted by ANTICHRISTUS View Post
I don't understand your request, just search this keyword (without edititng it) only in titles: *command*
examples:Say Commands, Custom Say Commands
But that doesn't execute a command. I mean I need a plugin that execute amx_banip "%s" "1440" "reasonofban" when user says something. It executes a command but I don't know how to edit and get_user_name so it will replace the %s with user name.
I hope you get me cuz I know what im asking and there is not anything like I want before. So dont try to give me plugins (Suggest them and give link etc) just if you can make it and post the code otherwise there is no need to comment
DIS is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 07-19-2013 , 13:35   Re: [REQ] Small and simple plugin
Reply With Quote #4

Quote:
Originally Posted by DIS View Post
...I hope you get me ...
Quote:
Originally Posted by ANTICHRISTUS View Post
I don't understand your request, just search this keyword (without edititng it) only in titles: *command*

examples: Say Commands, Custom Say Commands
__________________
ANTICHRISTUS is offline
5aloOod
Senior Member
Join Date: Jun 2013
Location: hell
Old 07-19-2013 , 15:18   Re: [REQ] Small and simple plugin
Reply With Quote #5

like when a player swearing like he says (fuck you) the server will ban the player automatically ? like that?
5aloOod is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-20-2013 , 03:33   Re: [REQ] Small and simple plugin
Reply With Quote #6

Quote:
Originally Posted by 5aloOod View Post
like when a player swearing like he says (fuck you) the server will ban the player automatically ? like that?
Look for swear plugins.
__________________
fysiks is offline
DIS
Senior Member
Join Date: Jul 2013
Location: Somewhere Here xD
Old 07-20-2013 , 07:26   Re: [REQ] Small and simple plugin
Reply With Quote #7

Quote:
Originally Posted by 5aloOod View Post
like when a player swearing like he says (fuck you) the server will ban the player automatically ? like that?
No not like that not just swear. Man I just don't know how to arrange the code like I want something like this
if equali said "hello", get_user_name, server_cmd amx_banip "%s" "1440" "aReason", name
Now u got it ?
I know some lines but I don't know how to arrange it. Now u know what I mean exactly and if u know how to code, just arrange them and post the sma file here
DIS is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-20-2013 , 18:57   Re: [REQ] Small and simple plugin
Reply With Quote #8

A swear plugin should work unless you explain exactly what you are actually trying to do. It seems like you are trying to hide something.
__________________
fysiks is offline
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 07-21-2013 , 05:30   Re: [REQ] Small and simple plugin
Reply With Quote #9

Quote:
Originally Posted by DIS View Post
No not like that not just swear. Man I just don't know how to arrange the code like I want something like this
if equali said "hello", get_user_name, server_cmd amx_banip "%s" "1440" "aReason", name
Now u got it ?
I know some lines but I don't know how to arrange it. Now u know what I mean exactly and if u know how to code, just arrange them and post the sma file here
This was basically taken from roll the dice plugin, I don't know if it's gonna work

PHP Code:
#include <amxmodx>
#include <amxmisc>

new const iReason[] = "Your ban reason"

public plugin_init() {
    
register_plugin("PLUGIN""VERSION""AUTHOR")
    
register_clcmd("say""HandleSay")
}

public 
HandleSay(id)
{
    new 
Speech[192];
    
read_args(Speech,192);
    
remove_quotes(Speech);
    
    if(
HandleSay2(id,Speech))    
        return 
PLUGIN_HANDLED;

    return 
PLUGIN_CONTINUE;
}

public 
HandleSay2(id,Speech[])
{
    new 
player[32]
    
    if ( (
equali(Speech"hello")) )
    {
        
get_user_name(idplayercharsmax(player))
        
server_cmd("amx_banip %s 1440 %s"playeriReason); 
    }
    
    return 
PLUGIN_CONTINUE;

Moody92 is offline
DIS
Senior Member
Join Date: Jul 2013
Location: Somewhere Here xD
Old 07-22-2013 , 02:36   Re: [REQ] Small and simple plugin
Reply With Quote #10

Quote:
Originally Posted by Moody92 View Post
This was basically taken from roll the dice plugin, I don't know if it's gonna work

PHP Code:
#include <amxmodx>
#include <amxmisc>

new const iReason[] = "Your ban reason"

public plugin_init() {
    
register_plugin("PLUGIN""VERSION""AUTHOR")
    
register_clcmd("say""HandleSay")
}

public 
HandleSay(id)
{
    new 
Speech[192];
    
read_args(Speech,192);
    
remove_quotes(Speech);
    
    if(
HandleSay2(id,Speech))    
        return 
PLUGIN_HANDLED;

    return 
PLUGIN_CONTINUE;
}

public 
HandleSay2(id,Speech[])
{
    new 
player[32]
    
    if ( (
equali(Speech"hello")) )
    {
        
get_user_name(idplayercharsmax(player))
        
server_cmd("amx_banip %s 1440 %s"playeriReason); 
    }
    
    return 
PLUGIN_CONTINUE;

Thanks man it works but only a problem here: I have advanced bans, and it shows the reason the 1440. Like instead of showing the reason, it's showing the minutes of the ban.
EDIT: The problem is it doesn't have " like: amx_banip "%s" "1440" "%s"
I tried and compile error can u edit it?

Last edited by DIS; 07-22-2013 at 02:38.
DIS 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 23:45.


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