Raised This Month: $32 Target: $400
 8% 

TE_PLAYERATTACHMENT sprite


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 01-28-2018 , 05:23   TE_PLAYERATTACHMENT sprite
Reply With Quote #1

Hi, i'm using this stock to create a player attachment:
Code:
stock Create_TE_PLAYERATTACHMENT(id, entity, vOffset, iSprite, life){

	message_begin( MSG_ONE, SVC_TEMPENTITY, { 0, 0, 0 }, id )
	write_byte( TE_PLAYERATTACHMENT )
	write_byte( entity )			// entity
	write_coord( vOffset )			// vertical offset ( attachment origin.z = player origin.z + vertical offset )
	write_short( iSprite )			// model index
	write_short( life )				// (life * 10 )
	message_end()
}
But no matter what sprite i use it will have a black background. I tried to recreate the sprite from .bmps with additive transparency(256colors) but the situation is still the same, i just can't get rid of that background. I'm I missing some additional options like render mode?

Last edited by Clauu; 01-28-2018 at 05:28.
Clauu is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 01-28-2018 , 10:33   Re: TE_PLAYERATTACHMENT sprite
Reply With Quote #2

Try to look how the radio icon is made (The icon above the player's head).
I think, it is shown using TE_PLAYERATTACHMENT.

--------------
I did it.

File: radio.spr
Size: 8x8
Frames: 1
Transparency mode: Alpha test

Also, it has pure blue background (0, 0, 255).
__________________
My English is A0

Last edited by E1_531G; 01-28-2018 at 10:44.
E1_531G is offline
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 01-29-2018 , 08:26   Re: TE_PLAYERATTACHMENT sprite
Reply With Quote #3

Hmm thanks for the tip, i will go further with the 'investigation' :-)
Clauu is offline
Reply



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 18:01.


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