Raised This Month: $ Target: $400
 0% 

problem while handling a say command


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-18-2009 , 21:32   Re: problem while handling a say command
Reply With Quote #2

edit:

tested and works:
PHP Code:
#include <amxmodx>
 
#define SVPASS_CMD ".svpass"
#define SVPASS_LEN 7 // how many chars the cmd has
 
public plugin_init() 
{
    
register_clcmd("say""hookSay")
}
 
public 
hookSay(id)
{
    static 
msg[192]
 
    
read_args(msg191)
    
remove_quotes(msg)
    
trim(msg)
 
    if(!
equali(msgSVPASS_CMDSVPASS_LEN))
        return 
PLUGIN_CONTINUE
 
    copy
(msg191msg[SVPASS_LEN+1]) // remove the ".svpass" from string
 
    
server_cmd("sv_password ^"%s^""msg)
 
    
client_print(0print_chat"(test) Server password changed to: %s"msg// you can remove this
 
    
return PLUGIN_HANDLED

__________________

Last edited by Hunter-Digital; 05-18-2009 at 21:42.
Hunter-Digital 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:31.


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