Raised This Month: $ Target: $400
 0% 

register_concmd... don t work the command....


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sanaell
Senior Member
Join Date: May 2004
Location: SamutPrakarn Thailand
Old 05-31-2004 , 05:26   register_concmd... don t work the command....
Reply With Quote #1

this is a command , that work but...
Code:
    register_concmd("artime_cfg","change_time",ADMIN_CVAR,msg04[LANG])


when i type
artime_cfg 5.0 in console
i have that
AMX unknow command
AMXX set cvar anti_respawn_time 0.00000.0


Code:
public change_time( id,level,cid ) {     new cmds[32]     new artime = read_argv(1,cmds,31)     client_cmd(id, "amx_cvar anti_respawn_time %f.0",artime) }


Why ?????
and what is not good in that code
__________________
[email protected]
The Source of Pain is the Pain of Source
sanaell is offline
Send a message via MSN to sanaell
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 05-31-2004 , 06:25  
Reply With Quote #2

Try this:
Code:
public change_time(id,level,cid) {     new arg[32]     read_argv(1, arg, 31)     client_cmd(id, "amx_cvar anti_respawn_time %s", arg)     return PLUGIN_HANDLED; }

If you don't return PLUGIN_HANDLED, the return value will be 0, which is PLUGIN_CONTINUE. That's why you get unknown command.
__________________
hello, i am pm
PM is offline
sanaell
Senior Member
Join Date: May 2004
Location: SamutPrakarn Thailand
Old 05-31-2004 , 08:02  
Reply With Quote #3

Thx

now ... i must give Godmode ... lol
__________________
[email protected]
The Source of Pain is the Pain of Source
sanaell is offline
Send a message via MSN to sanaell
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 05-31-2004 , 09:59  
Reply With Quote #4

you need to
a) #include <fun>
b) set_user_godmode(id, 1) <-- turns godmode on
set_user_godmode(id, 0) <-- turns godmode off
__________________
hello, i am pm
PM 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 07:02.


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