Raised This Month: $ Target: $400
 0% 

help with say cmd


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kimilover
Junior Member
Join Date: Oct 2010
Old 05-21-2013 , 05:06   help with say cmd
Reply With Quote #1

Hi guys i want a say cmd .setpass "password" to set sv_password "password". I try to make it with this code but it isn work when i write .setpass 32 but when i write .setpass and it dont set any password because i dont give one.

Quote:
/* Say cmd .Setpass ...*/

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

#define PLUGIN ".setpass"
#define VERSION "1.0"
#define AUTHOR "Nefos"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say","set_pass")
}

public set_pass(id) {
if(has_flag(id, "v"))
{
new password[32], setpass[32]
read_args(setpass,31)
remove_quotes(setpass)
if (equali(setpass, ".setpass ", 11))
{


read_argv(2, password, 32)
server_cmd("sv_password %s",password)
client_print(0, print_chat,"[AMXX] PASSWORD SETTED")
}
}

else {
client_print(0,print_chat,"NO ACCESS")
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
kimilover 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 16:27.


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