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

Problem with %s or %s0.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
luxor
Member
Join Date: Jan 2014
Old 06-29-2014 , 19:30   Problem with %s or %s0.
Reply With Quote #1

When an admin send that comand : "amx_say %s0", all clients from server will crash.
or "amx_say %s%s%s%s%s%s%s%s%s%s"

I think that is an very annoying bug...

same thing at:
amx_psay name %s0
amx_csay color %s0
amx_tsay color %s0
amx_chat %s0
amx_kick name %s0
amx_ban ban time %s0
amx_banip name tine %s0
say @|@|@ color %s0
sayteam @ %s0
luxor is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-29-2014 , 20:51   Re: Problem with %s or %s0.
Reply With Quote #2

amxx version
meta version
version
meta list


Post the output from these commands
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 06-29-2014 at 20:52.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
luxor
Member
Join Date: Jan 2014
Old 06-30-2014 , 08:06   Re: Problem with %s or %s0.
Reply With Quote #3

I have a test server in my pc


] amxx version
AMX Mod X 1.8.3-dev+1b514d6 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: May 27 2014, 06:50:40
Build ID: 3876:1b514d6f23c69587b5bce7450adb9a24c5a7d59e
Core mode: JIT+ASM32


] meta version
Metamod v1.21p37 2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://metamod-p.sourceforge.net/
compiled: May 30 2013, 11:41:14 EET (optimized)


] version
Protocol version 48
Exe version 1.1.2.7 (cstrike)
Exe build: 17:46:18 Apr 25 2013 (6027)


] meta list
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] AMX Mod X RUN - amxmodx_mm.dll v1.8.3-d ini Start ANY
[ 2] Bot Player Time RUN - bot_played_time_ v1.1 ini ANY ANY
[ 3] Fun RUN - fun_amxx.dll v1.8.3-d pl1 ANY ANY
[ 4] CStrike RUN - cstrike_amxx.dll v1.8.3-d pl1 ANY ANY
[ 5] CSX RUN - csx_amxx.dll v1.8.3-d pl1 ANY ANY
5 plugins, 5 running
luxor is offline
ArabicMan
Veteran Member
Join Date: Feb 2014
Location: مصر
Old 06-30-2014 , 08:49   Re: Problem with %s or %s0.
Reply With Quote #4

How to fix it guys?
ArabicMan is offline
WaLkMaN
Senior Member
Join Date: Oct 2010
Location: Varna, Bulgaria
Old 06-30-2014 , 09:56   Re: Problem with %s or %s0.
Reply With Quote #5

Quote:
Originally Posted by ArabicMan View Post
How to fix it guys?
Just block %
WaLkMaN is offline
ArabicMan
Veteran Member
Join Date: Feb 2014
Location: مصر
Old 06-30-2014 , 10:14   Re: Problem with %s or %s0.
Reply With Quote #6

Quote:
Originally Posted by WaLkMaN View Post
Just block %
How?
ArabicMan is offline
WaLkMaN
Senior Member
Join Date: Oct 2010
Location: Varna, Bulgaria
Old 06-30-2014 , 10:33   Re: Problem with %s or %s0.
Reply With Quote #7

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

public plugin_init()
{
    
register_plugin("Block symbol""1.0""SpeeDeeR@amxmodxbg")
    
register_clcmd("say""handle_say")
    
register_clcmd("say_team""handle_say")
}

public 
handle_say(id)
{
    static 
arg[256]
    
read_args(arg255)
    
remove_quotes(arg)
    
trim(arg)

    return 
containi(arg"%") != -PLUGIN_HANDLED PLUGIN_CONTINUE


Last edited by WaLkMaN; 06-30-2014 at 10:40.
WaLkMaN is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 06-30-2014 , 10:52   Re: Problem with %s or %s0.
Reply With Quote #8

Quote:
Originally Posted by WaLkMaN View Post
PHP Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
    
register_plugin("Block symbol""1.0""SpeeDeeR@amxmodxbg")
    
register_clcmd("say""handle_say")
    
register_clcmd("say_team""handle_say")
}

public 
handle_say(id)
{
    static 
arg[256]
    
read_args(arg255)
    
remove_quotes(arg)
    
trim(arg)

    return 
containi(arg"%") != -PLUGIN_HANDLED PLUGIN_CONTINUE

That will only work on the say commands. It will also block anyone using % in their messages, which is really bad.
__________________

Last edited by Black Rose; 06-30-2014 at 10:53.
Black Rose is offline
Shooting King
RAAASENGAN
Join Date: Mar 2012
Location: India
Old 06-30-2014 , 11:16   Re: Problem with %s or %s0.
Reply With Quote #9

Fix for bold things.
Quote:
Originally Posted by luxor View Post
amx_psay name %s0
amx_csay color %s0
amx_tsay color %s0
amx_chat %s0
amx_kick name %s0
amx_ban ban time %s0
amx_banip name tine %s0
say @|@|@ color %s0
sayteam @ %s0
For other things, which BanPlugin are you using ?? Advanced Bans or the Default one ??
Attached Files
File Type: sma Get Plugin or Get Source (adminchat.sma - 719 views - 12.6 KB)
__________________
As every time said, don't ever UNDERESTIMATE me.

Donate - Here
Shooting King is offline
luxor
Member
Join Date: Jan 2014
Old 06-30-2014 , 11:50   Re: Problem with %s or %s0.
Reply With Quote #10

thx, i will test it, can you do same thing on admincmd ?
luxor 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 22:49.


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