PDA

View Full Version : [TUT] User Icon Status


SAMURAI16
03-13-2007, 09:22
On this tutorial, I will examplain / show examples about user status icon.
Status icon is a hud icon placed in the screen of player, and is used in some cases for indicates user status.
Can use this for example if an player have on him equip and rocket laucher, to show an icon to indicate that ; it's for aspect ;)

To make to show at a player an hud icon, the icon must be created in a message constant.
Now, let's start:
• First of all, we will declare a variabile for get user msgid. Variable will be called iconstatus.
So,
new iconstatus• In plugin_init, we use variable:
iconstatus = get_user_msgid("StatusIcon")• Like how i alearly said, we will make to show the status icon with a message constant.
We start with:
message_begin(MSG_ONE,iconstatus,{0,0,0},id) • After, we will write a byte with the type of show:
Are available 3 types of show:
0 = Hide
1 = Show
2 = Flash
So we wil use:
write_byte(1)That means will show the icon status.

• After, will write string the name of sprite icon
Are available 88 icon status.
I maked screenshots where i saw necessary one.

1. dmg_rad:
http://img95.**************/img95/5918/dmgradmh4.jpg (http://**************)

2. dmg_heat:
http://img178.**************/img178/4803/dmgheatnd4.jpg (http://**************)
3. dmg_gas:
http://img72.**************/img72/3686/dmggaser1.jpg (http://**************)

4. dmg_drown:
http://img72.**************/img72/6564/dmgdrownps5.jpg (http://**************)

5. dmg_cold:
http://img291.**************/img291/7311/dmgcolddw9.jpg (http://**************)

6. dmg_bio:
http://img246.**************/img246/9513/dmgbiokb4.jpg (http://**************)

7. dmg_shock:
http://img50.**************/img50/8814/dmgshocksh9.jpg (http://**************)


8. item_longjump:
http://img59.**************/img59/5223/itemlongjumpyr6.jpg (http://**************)


9. item_battery:
http://img62.**************/img62/5586/itembatteryok3.jpg (http://**************)

10. item_healthkit:

11. flash_beam:

12. d_knife:
Also are available all weapons with prefix d_* .Ex: d_ak47, d_awp, d_mp5navy.

13. cross:

14. stopwatch:

15. suit_full:

• I didn't take screenshots to all icons, because rests of them are just lines or stuff like that, and i don't saw any point to use it.
• I used name of icons but without screenshots because limit of images on a thread is 10 :(
• I want to give some credits to Alka because helped me to make last snapshots .

So, we will use
write_string("sprite name")• Now we will write the color of icon, in rgb format:

write_byte(r)
write_byte(b)
write_byte(g)• And finnish the message constant
message_end()And complete example, to show an hud icon with icon when user is on air

#include <amxmodx>
#include <fakemeta>


new iconstatus;

public plugin_init() {
register_plugin("Status Icon","0.1","SAMURAI");

register_forward(FM_PlayerPreThink,"fw_prethink");
iconstatus = get_user_msgid("StatusIcon");

}

public fw_prethink(id)
{
if(!(pev(id,pev_button) & FL_ONGROUND))
{
message_begin(MSG_ONE,iconstatus,{0,0,0},id);
write_byte(1); // status (0=hide, 1=show, 2=flash)
write_string("dmg_poison"); // sprite name
write_byte(0); // red
write_byte(255); // green
write_byte(0); // blue
message_end();
}

}
Anyway, i saw some request with list of all incons;
There is..

selection
bucket1
bucket2
bucket3
bucket4
bucket5
bucket0
dmg_bio
dmg_poison
dmg_chem
dmg_cold
dmg_drown
dmg_heat
dmg_gas
dmg_rad
dmg_shock
number_0
number_1
number_2
number_3
number_4
number_5
number_6
number_7
number_8
number_9
divider
cross
dollar
minus
plus
c4
defuser
stopwatch
smallskull
smallc4
smallvip
buyzone
rescue
escape
vipsafety
suit_full
suit_empty
suithelmet_full
suithelmet_empty
flash_full
flash_empty
flash_beam
train_back
train_stop
train_forward1
train_forward2
train_forward3
autoaim_c
title_half
title_life
d_knife
d_ak47
d_awp
d_deagle
d_flashbang
d_fiveseven
d_g3sg1
d_glock18
d_grenade
d_m249
d_m3
d_m4a1
d_mp5navy
d_p228
d_p90
d_scout
d_sg550
d_sg552
d_ump45
d_usp
d_tmp
d_xm1014
d_skull
d_tracktrain
d_aug
d_mac10
d_elite
d_headshot
item_battery
item_healthkit
item_longjump
radar


Have fun

Howdy!
03-13-2007, 09:31
...

watch
03-13-2007, 09:57
I know its just an example but it would be better to cache whether the player has been send the message rather than send it over and over. Then when they release attack, remove it. D:

VEN
03-13-2007, 10:20
Furthermore this may lead to client's overflow.

unikow
03-13-2007, 11:56
Are available 9 icon status.
Where are the last 3???

SAMURAI16
03-13-2007, 13:21
Where are the last 3???

ops, available are 6 ;)

2. Changed the example ;)

Drak
03-13-2007, 15:10
Wont this only work in CS?

Hawk552
03-13-2007, 22:11
Wont this only work in CS?

AFAIK it should work across the board.

sawce
03-13-2007, 22:45
StatusIcon is not in NS, and if memory serves it's not in DoD either. I'm not too sure aboot that one, though

It's in the standard SDK, so most mods still have it.

Hawk552
03-13-2007, 23:07
StatusIcon is not in NS, and if memory serves it's not in DoD either. I'm not too sure aboot that one, though

It's in the standard SDK, so most mods still have it.
Yeah, but that's because Flayra disables like everything useful and fun.

SAMURAI16
03-14-2007, 15:36
-updated the tut :o

flyeni6
03-18-2007, 14:42
Are available 88 icon status.


where are they located or where can I find them?

SAMURAI16
03-18-2007, 14:52
sprites\hud.txt . I'm not sure if you will use rest of them :)

zenix
03-18-2007, 15:32
I dont have a hud.txt file. Is there another way to find out all the hud icons? Or could you post your copy of hud.txt? (I have CS 1.6)

Nice tut, though! Really think these'll be useful. :)

SAMURAI16
03-18-2007, 15:37
i updated the first post
- see there

|POW|Da_ghost
04-02-2007, 04:17
For some reason I'm getting "Plugin called message_begin with invalid message id"
PS:I'm running svencoop(and DMG icons are enabled)

SAMURAI16
04-02-2007, 07:09
maybe you don't checked something good or something .

|POW|Da_ghost
04-02-2007, 07:58
Made a test command(Yes command) to test this.
#include <amxmodx>
#include <amxmisc>
new iconstatus
public plugin_init() {
register_plugin("[404]symtest","0.1","Da_ghost")
register_concmd("404_sym","gho_sym",ADMIN_RCON,"BETA")
iconstatus = get_user_msgid("StatusIcon")
}
public gho_sym(id,level,cid) {
if (!cmd_access(id,level,cid,1))
return PLUGIN_HANDLED
message_begin(MSG_ONE,iconstatus,{0,0,0},id);
write_byte(1); // status (0=hide, 1=show, 2=flash)
write_string("dmg_bio"); // sprite name
write_byte(0); // red
write_byte(0); // green
write_byte(255); // blue
message_end();
return PLUGIN_HANDLED
}

Soz the quick edit messed up

SAMURAI16
04-02-2007, 08:01
add if(!is_user_alive(id)) return PLUGIN_HANDLED;

|POW|Da_ghost
04-02-2007, 08:11
L 04/02/2007 - 15:12:09: Plugin called message_begin with an invalid message id
(0).
L 04/02/2007 - 15:12:09: [AMXX] Displaying debug trace (plugin "404_multi.amxx")
L 04/02/2007 - 15:12:09: [AMXX] Run time error 10: native error (native "message_begin")
L 04/02/2007 - 15:12:09: [AMXX] [0] 404_test.sma::gho_sym (line 953)

This is the error.
PS:The piece was a part of a bigger plugin so the lines differ.
Also the thing you suggested didn't work.

SAMURAI16
04-02-2007, 08:13
try with MSG_ONE_UNRELIABLE instead of MSG_ONE

|POW|Da_ghost
04-02-2007, 08:22
Same error . The iconstatus = get_user_msgid("StatusIcon") could be something else in Sven

zenix
04-04-2007, 22:20
How does the code ensure that only the user in the air see's the icon? Don't you have to add something so only the user sees it, not every player? Or is it so smart that it automatticlly shows it only to 1 person? I'd like to know how, for sure, it only shows an icon to 1 person not every one.

Sorry! didn't see one major thing:

message_begin(MSG_ONE,iconstatus,{0,0,0},id)


Man, am i blind! :roll: Need to thourghly look at code!

Different question: I'm making a mod that display's the icon for the user's current weapon. It displays it correctly, but the icon does not disappear when the user changes weapon. I realize that there isn't any code already in it that would remove the icon, so how would I go about removing it?

diamond-optic
04-12-2007, 19:42
StatusIcon is not in NS, and if memory serves it's not in DoD either. I'm not too sure aboot that one, though

correct on the dod part.. sadly its not present...

Aviram1994
05-14-2007, 15:07
Hmmmm, Can i add icons ? Like adding the source icons because they source icons look c00ler =D

Fredd
08-10-2007, 05:49
could i control the origin of them? cuz i wanna set bunch of icons on a player will they go over each there or will every one take a free space?

Alka
08-10-2007, 06:23
There is the origin!


new origin[3] = {0,0,0};

message_begin(MSG_ONE,iconstatus,origin,id);b ut i don't know the origins... ! ^^

Fredd
08-10-2007, 16:58
isnt' the hud 2d? x and y ? im so lost.
edit: nvm they take open space in the hud so no need to mess with the origin

raidmax
03-29-2008, 05:03
Its possible to create my own sprite with text? And how to do that?

Exolent[jNr]
03-29-2008, 15:39
you have to make a .bmp picture, with a black background
then, use a sprite creator, and use that picture.

raidmax
03-30-2008, 07:02
you have to make a .bmp picture, with a black background
then, use a sprite creator, and use that picture.
Yea, i know that, but how to config it?
hud.txt

anakin_cstrike
04-20-2008, 12:37
Owesome:) thanks:up:

But how to make the icon desepear ?

Howdy!
04-22-2008, 16:15
Owesome:) thanks:up:

But how to make the icon desepear ?


After, we will write a byte with the type of show:
Are available 3 types of show:
0 = Hide
1 = Show
2 = Flash
write_byte(0); // status (0=hide, 1=show, 2=flash)


You must learn to read better. :)

hoboman
04-23-2008, 16:22
I have been trying to do the same thing as raidmax, but I couldn't get it to work as of yet...
can anyone post up the code to make a custom icon show up?

never mind...it cannot be done

AntiBots
07-06-2008, 00:52
Can i put personal ICONS?

ConnorMcLeod
07-06-2008, 01:53
never mind...it cannot be done

anakin_cstrike
07-05-2009, 17:26
How to combine those and create a number? 16 for instance. Also how to make negative nubmers? e.g -7 ?

number_0
number_1
number_2
number_3
number_4
number_5
number_6
number_7
number_8
number_9

ConnorMcLeod
07-06-2009, 00:34
How to combine those and create a number? 16 for instance. Also how to make negative nubmers? e.g -7 ?

number_0
number_1
number_2
number_3
number_4
number_5
number_6
number_7
number_8
number_9

Try to send 2 messages in a row, seem to be how it's made there : http://forums.alliedmods.net/showthread.php?t=94042

Trinity
09-25-2009, 17:13
help me please with that code:

#include <amxmodx>
#include <fakemeta>

new origin[3] = {0,0,0};
new iconstatus;
new team = get_user_team(player)


public plugin_init() {
register_plugin("Status Icon","0.1.0","Trinity");

register_forward(FM_PlayerPreThink,"fw_prethink");
iconstatus = get_user_msgid("StatusIcon");

}

public fw_prethink(id)
{
if(!(pev(id,pev_button) & FL_ONGROUND))
{
switch (team == TEAM_T)
{
message_begin(MSG_ONE,iconstatus,origin,id);
write_byte(2); // status (0=hide, 1=show, 2=flash)
write_string("dmg_poison"); // sprite name
write_byte(255); // red
write_byte(0); // green
write_byte(0); // blue
message_end();
}else switch (team == TEAM_CT) {
message_begin(MSG_ONE,iconstatus,origin,id);
write_byte(2); // status (0=hide, 1=show, 2=flash)
write_string("dmg_shock"); // sprite name
write_byte(0); // red
write_byte(0); // green
write_byte(255); // blue
message_end();
} else switch (team == TEAM_SPECTATOR) {
message_begin(MSG_ONE,iconstatus,origin,id);
write_byte(2); // status (0=hide, 1=show, 2=flash)
write_string("item_battery"); // sprite name
write_byte(0); // red
write_byte(255); // green
write_byte(0); // blue
message_end();

}

What's wrong in it?!But when I try to compile it.I see that:

//// rankicon.sma
// C:\games\csdm\cstrike\addons\amxmodx\scriptin g\rankicon.sma(6) : error 017: u
ndefined symbol "player"
// C:\games\csdm\cstrike\addons\amxmodx\scriptin g\rankicon.sma(6 -- 9) : error 0
08: must be a constant expression; assumed zero
// C:\games\csdm\cstrike\addons\amxmodx\scriptin g\rankicon.sma(21) : error 017:
undefined symbol "TEAM_T"
// C:\games\csdm\cstrike\addons\amxmodx\scriptin g\rankicon.sma(23) : warning 215
: expression has no effect
// C:\games\csdm\cstrike\addons\amxmodx\scriptin g\rankicon.sma(30) : error 017:
undefined symbol "TEAM_CT"
// C:\games\csdm\cstrike\addons\amxmodx\scriptin g\rankicon.sma(31) : warning 215
: expression has no effect
// C:\games\csdm\cstrike\addons\amxmodx\scriptin g\rankicon.sma(32) : warning 217
: loose indentation
// C:\games\csdm\cstrike\addons\amxmodx\scriptin g\rankicon.sma(38) : error 010:
invalid function or declaration
// C:\games\csdm\cstrike\addons\amxmodx\scriptin g\rankicon.sma(47) : error 054:
unmatched closing brace
// C:\games\csdm\cstrike\addons\amxmodx\scriptin g\rankicon.sma(48) : warning 204
: symbol is assigned a value that is never used: "iconstatus"
//
// 6 Errors.
// Could not locate output file compiled\rankicon.amx (compile failed).

diamond-optic
09-25-2009, 17:26
you cant declare a global using a native call like:

new team = get_user_team(player)

youre using the switch wrong.. you dont use switch { .... } else switch { .... } etc... use if & else if
or use some method similar to:

switch(team)
{
case TEAM_T:
{
//code here
}
case TEAM_CT:
{
//code here
}
case TEAM_SPECTATOR:
{
//code here
}
}


using FL_ONGROUND with pev_button is also not proper either, FL_ONGROUND would be used with pev_flags.. pev_button uses constants that start with "IN_"

TEAM_T & TEAM_CT are not valid constants

as well as theres missing closing brackets in the fw_prethink function

Trinity
09-26-2009, 07:38
can you write me how can I do it(write fixed code here)plzz!!
+karma

Russiaboy
01-19-2010, 11:01
how i can add my own sprite?

Xellath
01-19-2010, 12:51
how i can add my own sprite?

Not possible. The only way that could be possible is to edit every clients hud.txt , which is not even possible with AMXX.

fezh
01-19-2010, 13:14
Not possible. The only way that could be possible is to edit every clients hud.txt , which is not even possible with AMXX.I dunno where that file is located, but I think it's possible make everyone download a new file called hud.txt using precache_generic( ) native.
Anyway I think you can use your own sprites everywere :/

Arkshine
01-19-2010, 13:16
hud.txt is located in the steam cache file "counter-strike.gcf".

But since this file exists, you can not force to download a new file.

Russiaboy
01-19-2010, 13:36
and can i make that other players see it too?

Arkshine
01-19-2010, 13:40
Those players have to edit manually hud.txt and copying your sprite on their computer before.

Russiaboy
01-19-2010, 15:32
no other way?

Arkshine
01-19-2010, 15:34
No.

Russiaboy
01-20-2010, 11:19
Those players have to edit manually hud.txt and copying your sprite on their computer before.

and if some can make that a hud.txt need to download and its load from there?

KadiR
01-20-2010, 12:29
No.

epic .
04-08-2010, 00:03
I can not see the picture of the icons in the topic.
:|

Arkshine
04-08-2010, 03:36
I can see them, you have probably a problem with your browser.

epic .
04-08-2010, 05:24
I can see them, you have probably a problem with your browser.

I see !!!
Our government is good at shielding :down:

OK, I use the proxy server, and I can see now. haha, thank you

lazarev
05-05-2010, 17:35
After typing "fullupdate" or starting record demo, my icon disappears, any way to fix it?

Exolent[jNr]
05-06-2010, 02:26
Hook "ResetHUD" event and show the icon again.

One
05-07-2010, 06:33
how to show more that 1 number in one line?

for example :
10
11
12
13 ..

or its impossible?

xvivax
08-08-2010, 13:22
Can I change the icon position?

Arkshine
08-08-2010, 13:40
That's not possible.

albert123
08-18-2010, 02:49
Oh, i like this TUT, very useful..thank

rrduna
11-26-2010, 19:32
nice.

Jacob
11-28-2010, 01:38
eventually,i found it.

bibu
12-11-2010, 11:05
Can someone tell me what the name of the sprite from wc3ft ability of nightelf is?

Vechta
12-11-2010, 11:40
How it looks?

Btw. for all here is a stock for Icons.
stock icon_status(index, status, const icon[], red, green, blue)
{
message_begin(MSG_ONE, iconstatus, {0,0,0}, index);
write_byte(status); // status (0=hide, 1=show, 2=flash)
write_string(icon); // sprite name
write_byte(red); // red
write_byte(green); // green
write_byte(blue); // blue
message_end();
}

How to use?
icon_status(id, 2, "dmg_shock", 255, 255, 255)

abdul-rehman
12-11-2010, 12:27
stock icon_status(index, status, const icon[], red, green, blue)
{
message_begin(MSG_ONE, iconstatus, {0,0,0}, index);
write_byte(status); // status (0=hide, 1=show, 2=flash)
write_string(icon); // sprite name
write_byte(red); // red
write_byte(green); // green
write_byte(blue); // blue
message_end();
}
--->

stock icon_status(index, status, const icon[], red, green, blue)
{
@@ message_begin(MSG_ONE_UNRELIABLE, iconstatus, {0,0,0}, index);
write_byte(status); // status (0=hide, 1=show, 2=flash)
write_string(icon); // sprite name
write_byte(red); // red
write_byte(green); // green
write_byte(blue); // blue
message_end();
}
You should use MSG_ONE_UNRELIABLE for such things since MSG_ONE can easily crash a server if the message is not sent

ConnorMcLeod
12-11-2010, 15:17
As a stock :
stock Send_StatusIcon(id, iStatus, szIcon[], iRed, iGreen, iBlue, bool:bReliable=false)
{
static iStatusIcon

message_begin(bReliable ? MSG_ONE : MSG_ONE_UNRELIABLE, iStatusIcon || (iStatusIcon = get_user_msgid("StatusIcon")), .player=id);
{
write_byte( clamp(iStatus, 0, 2) ); // status (0=hide, 1=show, 2=flash)
write_string( szIcon ); // sprite name
write_byte( clamp(iRed, 0, 255) ); // red
write_byte( clamp(iGreen, 0, 255) ); // green
write_byte( clamp(iBlue, 0, 255) ); // blue
}
message_end();
}


In a plugin :
new g_iStatusIcon

public plugin_init()
{
g_iStatusIcon = get_user_msgid("StatusIcon")
}

Send_StatusIcon(id, iStatus, szIcon[], iRed, iGreen, iBlue, bool:bReliable=false)
{
message_begin(bReliable ? MSG_ONE : MSG_ONE_UNRELIABLE, g_iStatusIcon, .player=id);
{
write_byte( clamp(iStatus, 0, 2) ); // status (0=hide, 1=show, 2=flash)
write_string( szIcon ); // sprite name
write_byte( clamp(iRed, 0, 255) ); // red
write_byte( clamp(iGreen, 0, 255) ); // green
write_byte( clamp(iBlue, 0, 255) ); // blue
}
message_end();
}

bibu
12-11-2010, 15:32
Can someone tell me what the name of the sprite from wc3ft ability of nightelf is?

Howdy!
12-11-2010, 16:53
Can someone tell me what the name of the sprite from wc3ft ability of nightelf is?

Why don't you find out yourself?

bibu
12-12-2010, 06:43
Why don't you find out yourself?

How should I find it myself if I am asking it here, if I would find and get what I need, I wouldn't ask here.

ConnorMcLeod
12-12-2010, 07:34
Can someone tell me what the name of the sprite from wc3ft ability of nightelf is?

How it looks?


Either answer that question, either go yourself look into the thousands lines wc3 source code, that's fair.

bibu
12-12-2010, 07:59
Oh sorry, didn't see that, here you go:

http://forums.alliedmods.net/attachment.php?attachmentid=6386&d=1149772180

ConnorMcLeod
12-12-2010, 08:28
Try smallskull

bibu
12-12-2010, 11:12
I already tried , d_skull + smallskull..

They're like the death symbol in CS.

Arkshine
12-12-2010, 11:52
Try item_battery or item_healthkit, don't remember. But that's something you could test yourself by making a simple plugin. You have a stock posted by Connor, and the list in the first page, it's not hard to make simple plugin with that.

bogdyuttzu
12-28-2010, 14:30
But icons from hl its show?

ConnorMcLeod
12-28-2010, 15:11
Yes.

Nightfall1
12-29-2010, 12:01
Yes.
I don't think is possible to show

the item_battery or item_healthkit it show because is in cstrike/sprites/hud.txt

ZoRaN
03-20-2011, 17:45
how could i put the sprite icon over the money hud?
i was playing on a server & there was an icon over the money hud.

nhock.lt
05-23-2012, 22:53
Hi, everyone.

I'm from Viet Nam. So I speak English not well. I'm a newbie and I'm learning how to show a status icon when round start and round end.

Can anyone help me?

benio101
06-04-2012, 17:37
Here I present all the sprites with their names as images:

https://lh3.googleusercontent.com/-chgnRpI-X6Q/T80kOe9pbIE/AAAAAAAAA88/bPTqE8DBSLE/s64-c/HalfLife1EventStatusIconSpritesImagesALL.jpg (https://picasaweb.google.com/112867124632056751890/HalfLife1EventStatusIconSpritesImagesALL?auth user=0&feat=directlink)

Click the above cover image to open full gallery.

TheDS1337
10-05-2012, 05:34
great tuto good job and thank you :mrgreen:

naven
01-04-2013, 17:39
Took me a long time to find this, it is related and is important for changing icon location
https://forums.alliedmods.net/showpost.php?p=1229701&postcount=14
List can be found here: http://wiki.amxmodx.org/Half-Life_1_Game_Events

ConnorMcLeod
01-20-2013, 07:22
Here is a list with all icons and a screenshot of them : http://doktor.haze.free.fr/counter-strike/sprites_screens/index.php

Also some stocks to show those sprites :

// StatusIcon
stock Util_StatusIcon(id, status=0, icon[], red=0, green=0, blue=0)
{
static msgStatusIcon = 0;
if( !msgStatusIcon )
{
msgStatusIcon = get_user_msgid("StatusIcon");
}
message_begin(id ? MSG_ONE : MSG_ALL, msgStatusIcon, _, id);
write_byte(status);
write_string(icon);
if( status )
{
write_byte(red);
write_byte(green);
write_byte(blue);
}
message_end();
}

// ItemPickup
stock Util_ItemPickup(id, szItem[])
{
static msgItemPickup = 0;
if( !msgItemPickup )
{
msgItemPickup = get_user_msgid("ItemPickup");
}
message_begin(id ? MSG_ONE : MSG_ALL, msgItemPickup, _, id );
write_string( szItem );
message_end();
}

// Scenario
stock Util_Scenario(id, status, sprite, alpha=255, rate=0, unknown=0)
{
static msgScenario = 0;
if( !msgScenario )
{
msgScenario = get_user_msgid("Scenario");
}
message_begin(id ? MSG_ONE : MSG_ALL, msgScenario, _, id);
write_byte(status);
if( status )
{
write_string(sprite);
write_byte(alpha);
write_short(rate);
write_short(unknown);
}
message_end();
}

Neeeeeeeeeel.-
01-20-2013, 11:48
Here is a list with all icons and a screenshot of them : http://doktor.haze.free.fr/counter-strike/sprites_screens/index.php

Also some stocks to show those sprites :

Send_StatusIcon(id, iStatus, szSprite[], r=0, g=0, b=0)
{
static msgStatusIcon
if( !msgStatusIcon )
{
msgStatusIcon = get_user_msgid("StatusIcon")
}

message_begin(MSG_ONE, msgStatusIcon, .player=id)
{
write_byte(iStatus)
write_string(szSprite)
if( iStatus )
{
write_byte(r)
write_byte(g)
write_byte(b)
}
}
message_end()
}

Send_ItemPickup(id, szSprite[])
{
static msgItemPickup
if( !msgItemPickup )
{
msgItemPickup = get_user_msgid("ItemPickup")
}

message_begin(MSG_ONE, msgItemPickup, .player=id)
write_string(szSprite)
message_end()
}

Send_Scenario(id, iStatus, szSprite[], alpha = 255, flashrate = 0)
{
static msgScenario
if( !msgScenario )
{
msgScenario = get_user_msgid("Scenario")
}

message_begin(MSG_ONE, msgScenario, .player=id)
write_byte(iStatus)
if( iStatus )
{
write_string(szSprite)
write_byte(alpha)
write_short(flashrate)
write_short(0)
}
message_end()
}Woooow thank you :D