Raised This Month: $ Target: $400
 0% 

Iconstatus (dude + need help)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-16-2012 , 08:05   Iconstatus (dude + need help)
Reply With Quote #1

Currently I use in this way to display icons:
PHP Code:
message_begin(MSG_ONE_UNRELIABLE,iconstatus,{0,0,0},id);
write_byte(1); // status (0=hide, 1=show, 2=flash)
write_string("dmg_shock"); // sprite name
write_byte(37); // red
write_byte(164); // green
write_byte(249); // blue
message_end();
                
message_begin(MSG_ONE_UNRELIABLE,iconstatus,{0,0,0},id);
write_byte(1); // status (0=hide, 1=show, 2=flash)
write_string("item_battery"); // sprite name
write_byte(37); // red
write_byte(164); // green
write_byte(249); // blue
message_end(); 
Is better MSG_ONE or MSG_ONE_UNRELIABLE?

How to use write_string with more items in one file?
ex: Code:
new files { "buy_zone", "item_battery", "another_icon" } write_string("files");


Also I have a menu, when is opened:
Code:
write_byte(0); // status (0=hide, 1=show, 2=flash) write_string("buy_zone"); // sprite name


and when is closed:
Code:
write_byte(1); // status (0=hide, 1=show, 2=flash) write_string("buy_zone"); // sprite name


What's is the best way and better coded?
bazhenov93 is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 05-13-2012 , 14:35   Re: Iconstatus (dude + need help)
Reply With Quote #2

bump
bazhenov93 is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-13-2012 , 15:01   Re: Iconstatus (dude + need help)
Reply With Quote #3

Use MSG_ONE_UNRELIABLE.
For the other questions - I don't understand you.
__________________
<VeCo> is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 05-13-2012 , 17:02   Re: Iconstatus (dude + need help)
Reply With Quote #4

Quote:
Originally Posted by bazhenov93 View Post
How to use write_string with more items in one file?
ex: Code:
new files { "buy_zone", "item_battery", "another_icon" } write_string("files");
Use a for loop.
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
Reply


Thread Tools
Display Modes

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 07:54.


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