AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Add new HUD 'Elements' (https://forums.alliedmods.net/showthread.php?t=10039)

TotalNoobScripter 02-06-2005 15:33

Add new HUD 'Elements'
 
If i were to make some sprites, would I be able to add them to the in-game HUD? Like say i wanted to add a sprite similar to how the defusal kit sprite is shown, but above it and when someones health is less tahn 50? (I know how to do the health part...) If it is possible, how would you tell the game where to place the sprite?

XxAvalanchexX 02-06-2005 16:28

You have to put it in the sprites folder and edit the sprites.txt file client-side, which is impossible.

TotalNoobScripter 02-06-2005 17:48

what if i put the sprites in the folder, and have the client himself edit the sprites.txt?

XxAvalanchexX 02-06-2005 18:15

If you could get every single person that plays on that server to do that, you could get it to work.

TotalNoobScripter 02-06-2005 18:27

but how? (not how as in to edit it but how as in how to place it on the screen!)

XxAvalanchexX 02-06-2005 18:33

Code:
message_begin(MSG_ONE,get_user_msgid("StatusIcon"),{0,0,0},id); write_byte(status); // status (0=hide, 1=show, 2=flash) write_string(spritename); // sprite name write_byte(r); // red write_byte(g); // green write_byte(b); // blue message_end();

TotalNoobScripter 02-07-2005 18:33

what does "StatusIcon" hook to? and how would u specifify 'coords' for the sprite on the hud?

XxAvalanchexX 02-07-2005 19:46

It makes an icon appear where the defusal kit icon, buy zone icon, VIP escape zone icon, hostage rescue zone, T escape zone, and bomb icons appear.

TotalNoobScripter 02-07-2005 21:58

does statusicon only hook for counter-strike?

XxAvalanchexX 02-07-2005 22:19

Yes.


All times are GMT -4. The time now is 19:16.

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