[TUT] Day Of Defeat Custom HUD Flag Icons
2 Attachment(s)
Good afternoon, today I will tell you how to use standard amxx solutions to install a custom flag icon in the interface of all players and on the radar with the map.
Description of the technique: The icon is changed when assigning a serial number to a pre-cached flag icon. It is important to understand that we cannot simply create a measure and place the index of a pre-cached file in it and simply assign it. it won't work. We will try to get to a free cell for icons from 0 to 24 approximately. When the map is launched, it comes with flag icons. For example, we will consider dod_caen.bsp PHP Code:
At a certain moment, you go to assign icon number 22 to some flag, but when assigned, the icon will be missing in the game, it will be an empty slot in the interface, as if the flag does not exist, you will not see this icon on the radar map either. We remember this number for dod_caen == 22 (please note that this may be a different number, since I conducted this research a month ago, and if you need to know for sure, then you will check it empirically. upd:: it's 22 for caen) If we open the game client console, we will see the following returns PHP Code:
PHP Code:
All that remains to be done: Create a custom sprite (preferably for both teams) First cache it, and assign our supposedly constant number to the flag. in the archive you will find an absolutely working solution for dod_caen In the image you will see that for dod_caen it worked, but for dod_donner , you need to look for free slots again, ultimately for customization you will have to create a downloadable configuration file that loads values for each map. Also in the source file of the plugin you will see that there is a collection of some information for each point, and taking its index, we can assign our own icon to a certain flag using the switch{case} .. So! Memo - Method for installing a custom sprite on a flag: 1. try all the numbers on m_iNeutral\Axis|AlliesIcon 2. If the flag icons are missing, open the console and there should be something like this: Server #2 Error: could not load file sprites/obj_icons/dod_caen/icon_obj_custom2_neutral.spr Error: could not load file sprites/obj_icons/dod_caen/icon_obj_custom2_allies.spr Error: could not load file sprites/obj_icons/dod_caen/icon_obj_custom2_axis.spr 3. Create sprites with the desired name from the console 4. Pre-cache sprites 5. Put empty numbers. 6. Done |
All times are GMT -4. The time now is 06:51. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.