AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   add argument (https://forums.alliedmods.net/showthread.php?t=332494)

giumbalau 05-16-2021 00:04

add argument
 
Does anyone know to add 1 more argument "value" when i set the cvar the value is automatically set to 0

PHP Code:

register_concmd("amx_unlag""unlag"ADMIN_KICK"[value]")

public 
unlag(id,level,cid
{      
       if(!
cmd_access(idlevelcid1))    
       {        
       return 
PLUGIN_HANDLED    
       
}    
          
       new 
arg1[32], name[32]    
       
read_argv(1arg131)        
       
get_user_name(idname31)  
       
chat_color(0"^x04[ADMIN]^x03 %s^x04 :^x04 set cvar^x03 sv_unlag^x04 to^x03 %d"namestr_to_num(arg1))        
       return 
PLUGIN_HANDLED 



Bugsy 05-16-2021 01:01

Re: add argument
 
I don't understand your question, can you give an example for the command you would enter and what you'd expect to happen?

"amx_unlag 0 ABC" results in the cvar getting set to 0, with "ABC" being the '1 more argument'?

Natsheh 05-16-2021 06:50

Re: add argument
 
Show the full code.


All times are GMT -4. The time now is 19:50.

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