AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block %s (https://forums.alliedmods.net/showthread.php?t=121728)

Debesėlis 03-19-2010 08:24

Block %s
 
How to block %s command in chat? when player write %s got another player name.

Example: %s hello.

Message got all players with his names..

xPaw 03-19-2010 08:43

Re: Block %s
 
replace_all( szSaid, 190, "%s", "%%s" );

Exploit btw with admincolorchat/alltalk and any random shit with is messing with chat without additional checks

Debesėlis 03-19-2010 09:25

Re: Block %s
 
doesn't work...

maybe gouge http://forums.alliedmods.net/showthread.php?p=647120 ?

wrecked_ 03-19-2010 15:37

Re: Block %s
 
Code:
public plugin_init() {     register_clcmd( "say", "CMD_Say" )     register_clcmd( "say_team", "CMD_Say" ) } public CMD_Say( id ) {     new said[128]         read_argv( 1, said, 127 )         if( containi( said, "%s" ) >= 0 )     {         /* Say command had %s in it         Do your stuff here */     }         return PLUGIN_CONTINUE;     /* CONTINUE if you want msg to go through or     HANDLED if you want it to block the say */ }


All times are GMT -4. The time now is 08:46.

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