AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   register_concmd... don t work the command.... (https://forums.alliedmods.net/showthread.php?t=2269)

sanaell 05-31-2004 05:26

register_concmd... don t work the command....
 
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

PM 05-31-2004 06:25

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.

sanaell 05-31-2004 08:02

Thx

now ... i must give Godmode ... lol

PM 05-31-2004 09:59

you need to
a) #include <fun>
b) set_user_godmode(id, 1) <-- turns godmode on
set_user_godmode(id, 0) <-- turns godmode off


All times are GMT -4. The time now is 07:02.

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