Raised This Month: $ Target: $400
 0% 

Some problem with code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
L3X.
Junior Member
Join Date: Nov 2006
Old 12-10-2006 , 07:37   Some problem with code
Reply With Quote #1

I have plugin that set password in cvar but I need simple command not in cvar.

Code:
register_clcmd("amx_set", "setcwpass")// this is set cw password register_cvar("admin_set_cw", "password") //this is your password feild public setcwpass(id) {     if(get_user_flags(id) & ADMIN_LEVEL_C)     {        *set_cvar_string("admin_set_cw","")  *  }     else  *console_print(id, "Must be admin to change the CW password")      }
But in game it write that no command how I can do it?
I need change cvar string simple command amx_set pass
not cvar. That amx_set chang string in admin_set_cw ">this<"

Last edited by L3X.; 12-10-2006 at 08:04.
L3X. is offline
mateo10
Veteran Member
Join Date: Jan 2006
Old 12-10-2006 , 08:18   Re: Some problem with code
Reply With Quote #2

Code:
public setcwpass(id) {     new Arg[32]     read_argv(2, Arg, 31)     if(get_user_flags(id) & ADMIN_LEVEL_C)     {         set_cvar_string("admin_set_cw", Arg)     } else {         console_print(id, "Must be an admin to change the CW password")     } }
Tell me if it works or not
mateo10 is offline
L3X.
Junior Member
Join Date: Nov 2006
Old 12-10-2006 , 10:35   Re: Some problem with code
Reply With Quote #3

Not work...

How I can stop plugin code and begin new in one plugin?
L3X. is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 12-10-2006 , 10:42   Re: Some problem with code
Reply With Quote #4

Why does it not work? Does it give you an error message, does it not change the cvar, etc?
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 12-10-2006 , 11:09   Re: Some problem with code
Reply With Quote #5

should be
read_argv(1, arg, 31)
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 12-10-2006 , 14:18   Re: Some problem with code
Reply With Quote #6

I tried to fix your plugin, please test it and tell me the results.
Attached Files
File Type: sma Get Plugin or Get Source (ppc_password.sma - 728 views - 3.2 KB)

Last edited by stupok; 12-10-2006 at 14:21.
stupok is offline
mateo10
Veteran Member
Join Date: Jan 2006
Old 12-10-2006 , 16:38   Re: Some problem with code
Reply With Quote #7

@ jim thought the command was the first. My bad.
@ stupok69 this is totally another plugin...

Here is a short short plugin that compiles fine.
Attached Files
File Type: sma Get Plugin or Get Source (passwordset.sma - 782 views - 412 Bytes)
mateo10 is offline
Reply



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 06:58.


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