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?