Raised This Month: $ Target: $400
 0% 

How to get what player is saying in chat?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
mahbodsr
Member
Join Date: Jun 2016
Old 06-12-2020 , 18:16   Re: How to get what player is saying in chat?
Reply With Quote #5

Quote:
Originally Posted by Grovliom View Post
i already know about register_clcmd and register_concmd, but is there another way to get what player is saying, like input name and calculator, and not in plugin_init?
try this:

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("BlaBla" "1.0" "MahBodSr")
    
register_clcmd"say" "handleSay" )
}

public 
handleSay()
{
    new 
msg[256]
    
read_argsmsg 255 // this is what client has written ( with Double-Qoutes at the beginning and end of string )
    
remove_quotesmsg // remove Double-Qoutes from the beggining and end of string


Last edited by mahbodsr; 06-12-2020 at 18:17.
mahbodsr 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 17:09.


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