Raised This Month: $ Target: $400
 0% 

problem while handling a say command


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Cader
Senior Member
Join Date: Mar 2007
Old 05-18-2009 , 20:48   problem while handling a say command
Reply With Quote #1

I want to make a command that changes server's current password immediately. A say command like; .svpass <newPassword>

I made a code that works but not properly. If I use "say .svpass 12345" via console, it works. But it doesnt when I try do this by pressing "y" key to say, then type .svpass 12345 , nothing happens.

Here is what I coded :

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

public plugin_init()
{
        
register_plugin(PLUGINVERSIONAUTHOR)
        
register_clcmd("say .svpass""pass")
}


public 
pass (id) {
new 
newpass[32]
read_argv(1newpass31)
server_cmd("sv_password %s"newpass)
return 
PLUGIN_HANDLED

Cader is offline
 


Thread Tools
Display Modes

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