Raised This Month: $ Target: $400
 0% 

Arrays and Consts


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mrki_Drakula
Senior Member
Join Date: Jun 2011
Location: Serbia
Old 09-08-2012 , 06:52   Arrays and Consts
Reply With Quote #1

Hello. How can i assign the right const according to the variable size, number whatever?

PHP Code:
new g_DayType[7]                    // Which Day Type is today?

new const Types[][] =
{
    
"Normal Day",
    
"Free Day",
    
"Games Day"

Now, i need to show right day type in the status hud.

PHP Code:
set_hudmessage255000.050.2000.11.00.10.1);
show_hudmessage0"[STATUS]^n- Day Type: %s"Types[g_DayType] ); 
That is what i have been trying, but its not working. Can someone help me please?

Note: I've attached number 7 to g_DayType, becasue there are 7 days ( 0, 1, 2, 3, 4, 5, 6 ... And 7 for 0 again ), so the Server can count the days. Which means, this is how im declaring the day, and day type.

PHP Code:
g_DayType[0] = 
First 0 says which day it is, and the second is attaching a day type to the day. Hope you understood me.
Mrki_Drakula is offline
Send a message via MSN to Mrki_Drakula Send a message via Skype™ to Mrki_Drakula
 



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:13.


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