Raised This Month: $ Target: $400
 0% 

amxclient_cmd bug?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
PartialCloning
Senior Member
Join Date: Dec 2015
Old 04-22-2017 , 18:38   amxclient_cmd bug?
Reply With Quote #1

Using read_argv + trim somehow stops the say command from sending the text when it's used with amxclient_cmd.

1. Use amx_test in console.
In chat it prints "Hello!".

2. Use amx_test 1
Nothing is printed.

Code:
#include <amxmodx> new bool:bToggle; public plugin_init() {     register_clcmd("say", "CMD_Say");     register_concmd("amx_test", "CMD_Test", ADMIN_ALL); } public CMD_Say(id) {     static Text[192];     if(bToggle)     {         read_args(Text, charsmax(Text));         trim(Text);     }     return PLUGIN_CONTINUE; } public CMD_Test(id) {     bToggle = read_argc() >= 2 ? true : false;     amxclient_cmd(id, "say", "Hello!");     return PLUGIN_HANDLED; }

Last edited by PartialCloning; 05-10-2017 at 14:45.
PartialCloning is offline
 



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 01:59.


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