Raised This Month: $ Target: $400
 0% 

Is it possible to use a pcvar in an array?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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 15:39.


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