Raised This Month: $51 Target: $400
 12% 

add argument


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
giumbalau
Member
Join Date: Jan 2021
Old 05-16-2021 , 00:04   add argument
Reply With Quote #1

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 

giumbalau is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-16-2021 , 01:01   Re: add argument
Reply With Quote #2

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'?
__________________
Bugsy is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-16-2021 , 06:50   Re: add argument
Reply With Quote #3

Show the full code.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 08:29.


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