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

[REQ] Small and simple plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 07-22-2013 , 07:15   Re: [REQ] Small and simple plugin
Reply With Quote #11

Not sure, you may try to change this

PHP Code:
server_cmd("amx_banip %s 1440 %s"playeriReason); 
to this

PHP Code:
server_cmd("amx_banip %s %s 1440"playeriReason); 
You can't add "" inside the "" plus if you use banip why would you ban using nick ? I'd rather using ip

EDIT: If it's the same problem try banning using IP

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 
szIP[40]
    
    if ( (
equali(Speech"hello")) )
    {
        
get_user_ip(idszIPcharsmax(ip), 1)
        
server_cmd("amx_banip %s 1440 %s"szIPiReason); 
    }
    
    return 
PLUGIN_CONTINUE;


Last edited by Moody92; 07-22-2013 at 07:22.
Moody92 is offline
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 07-22-2013 , 07:31   Re: [REQ] Small and simple plugin
Reply With Quote #12

Quote:
Originally Posted by Moody92 View Post
You can't add "" inside the ""
You can...
PHP Code:
server_print("My server is just ^"Awesome^""
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.
pokemonmaster is offline
DIS
Senior Member
Join Date: Jul 2013
Location: Somewhere Here xD
Old 07-22-2013 , 08:12   Re: [REQ] Small and simple plugin
Reply With Quote #13

Quote:
Originally Posted by Moody92 View Post
Not sure, you may try to change this

PHP Code:
server_cmd("amx_banip %s 1440 %s"playeriReason); 
to this

PHP Code:
server_cmd("amx_banip %s %s 1440"playeriReason); 
You can't add "" inside the "" plus if you use banip why would you ban using nick ? I'd rather using ip

EDIT: If it's the same problem try banning using IP

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 
szIP[40]
    
    if ( (
equali(Speech"hello")) )
    {
        
get_user_ip(idszIPcharsmax(ip), 1)
        
server_cmd("amx_banip %s 1440 %s"szIPiReason); 
    }
    
    return 
PLUGIN_CONTINUE;

Quote:
Originally Posted by pokemonmaster View Post
You can...
PHP Code:
server_print("My server is just ^"Awesome^""
1- Thanks to Moody92 for the script
2- Thanks to pokemonmaster for helping me on the ("My server is just ^"Awesome^"") part.
It worked for me and Moody, that was the "" problem, so I did the way pokemonmaster said and worked correctly
Thanks
EDIT:-
Quote:
Originally Posted by fysiks View Post
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.
Well fysiks, I didn't want to hide, but because I wanna fuck those who want bad of my server, so instead of hello, I replaced %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s, however, my server build is 5758, and the bug is fixed. I will update soon but I can't update, because SteamCMD fails for me (cuz im in a travel), and I will update when I reach home, and if I didn't say exactly what I wanna replace instead of hello, it was because you may think i'm Non-Steamer, and as usual, you would say "Remove dproto and update ur server", but I just wanted to ban those fucking hackers want to abuse my servers.
Thanks for understanding me
Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	186
Size:	1.8 KB
ID:	123000  

Last edited by DIS; 07-22-2013 at 08:22.
DIS is offline
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 07-22-2013 , 11:48   Re: [REQ] Small and simple plugin
Reply With Quote #14

Quote:
Originally Posted by pokemonmaster View Post
You can...
PHP Code:
server_print("My server is just ^"Awesome^""
Thank you for the tip.
Moody92 is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 07-22-2013 , 16:08   Re: [REQ] Small and simple plugin
Reply With Quote #15

Why not ban by SteamID?
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-22-2013 , 23:01   Re: [REQ] Small and simple plugin
Reply With Quote #16

Quote:
Originally Posted by joshknifer View Post
Why not ban by SteamID?
Because, like I said, he is probably hiding something.
__________________
fysiks is offline
DIS
Senior Member
Join Date: Jul 2013
Location: Somewhere Here xD
Old 07-23-2013 , 00:17   Re: [REQ] Small and simple plugin
Reply With Quote #17

Quote:
Originally Posted by fysiks View Post
Because, like I said, he is probably hiding something.
Hiding WHAT?
I ban by IP because in my country IPs are static so thats better than SteamID (My idea)
DIS is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-23-2013 , 01:22   Re: [REQ] Small and simple plugin
Reply With Quote #18

Quote:
Originally Posted by DIS View Post
Hiding WHAT?
I ban by IP because in my country IPs are static so thats better than SteamID (My idea)
It is extremely unlikely that a country would all have static IPs (it is economically unfeasible). Also, SteamID is the best method, no excuses.
__________________

Last edited by fysiks; 07-23-2013 at 01:22.
fysiks is offline
DIS
Senior Member
Join Date: Jul 2013
Location: Somewhere Here xD
Old 07-25-2013 , 06:30   Re: [REQ] Small and simple plugin
Reply With Quote #19

Quote:
Originally Posted by fysiks View Post
It is extremely unlikely that a country would all have static IPs (it is economically unfeasible). Also, SteamID is the best method, no excuses.
Well, our country has all static IP, and when you ban them by IP, he can't come to the server if he restart's his router, and IP is better cuz when an IP get banned, his brother, his family, etc can't come again cuz when an IP is banned, we can say "a home is banned" so he can't come with his bro's SteamID so IP is the best method if your country's IPs are static, not SteamID
DIS is offline
zi443r
Senior Member
Join Date: Mar 2009
Location: Braila,Romania
Old 07-25-2013 , 06:50   Re: [REQ] Small and simple plugin
Reply With Quote #20

@fysiks: IF he's using dproto it can generate same steamid for every connection of same player
@DIS: that build support dproto
__________________

Last edited by zi443r; 07-25-2013 at 06:51.
zi443r 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 07:42.


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