View Single Post
Author Message
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 03-10-2012 , 20:09   Is it possible to use a pcvar in an array?
Reply With Quote #1

PHP Code:
new const g_szOptionsMAX_MENU ][ ] =  //Item Names

    
"Big Bang",
    
"Blind Bomb",
    
"Freeze Dem Hoes",
    
"155 Extra Life Force",
    
"255 Armor",
    
"Speed Racist (20 Seconds)",
    
"Invis Cloak (20 Seconds)",
    
"Invincibility (20 Seconds)",
    
"Awp (1 Bullet)",
    
"Deagle (1 Bullet)",
    
"Spy Disguise (20 Seconds)",
    
"Iron Legs",
    
"Flash Protection",
    
"Chilly Skin",
    
"Cat Paws (Silent Walk)",
    
"I Live Forever (1 Per Map)"

For the items with seconds, i want to use my pcvars for the names so if the time is set for 15 seconds etc i wont need to change it manually. Can it be done?

Like this, except without errors

PHP Code:
new const g_szOptionsMAX_MENU ][ ] =  //Item Names

    
"Big Bang",
    
"Blind Bomb",
    
"Freeze Dem Hoes",
    
"155 Extra Life Force",
    
"255 Armor",
    
"Speed Racist (%i Seconds)",     //pcvar_speed
    
"Invis Cloak (%i Seconds)",        //pcvar_invis
    
"Invincibility (%i Seconds)",       //pcvar_invinc
    
"Awp (1 Bullet)",
    
"Deagle (1 Bullet)",
    
"Spy Disguise (%i Seconds)",     //pcvar_disguise
    
"Iron Legs",
    
"Flash Protection",
    
"Chilly Skin",
    
"Cat Paws (Silent Walk)",
    
"I Live Forever (1 Per Map)"

__________________
HideNSeek bug fixed here:http://forums.alliedmods.net/showpos...&postcount=951

PM me if you want a nice HideNSeek shop
NEED PLUGIN TESTERS PM ME
r4ndomz is offline
Send a message via Skype™ to r4ndomz