AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to show sprites with transparent with TE_PLAYERATTCHMENT (https://forums.alliedmods.net/showthread.php?t=172601)

dias 11-23-2011 08:48

How to show sprites with transparent with TE_PLAYERATTCHMENT
 
- I have this code
PHP Code:

#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <xs>

#define PLUGIN "Test"
#define VERSION "1.0"
#define AUTHOR "author"

new g_spr_id

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /test""test")
}

public 
plugin_precache()
{
    
g_spr_id precache_model("sprites/biohazard/zb_confuse.spr")
}

public 
test(id)
{
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY_id)
    
write_byte(TE_PLAYERATTACHMENT)
    
write_byte(id)
    
write_coord(45)
    
write_short(g_spr_id)
    
write_short(10 10)
    
message_end()


- But the show spr is not transparent. I want it to transparent, but i don't know how to do that, someone tell me how to do it of how to make sprites transparent

[IMG]http://img85.**************/img85/6287/29514184.png[/IMG]

tuty 11-23-2011 09:17

Re: How to show sprites with transparent with TE_PLAYERATTCHMENT
 
google->half life programs-> sprite explorer

then load sprite, set it to additive->save sprite-> got transparent one :)

yokomo 11-23-2011 10:24

Re: How to show sprites with transparent with TE_PLAYERATTCHMENT
 
This TE_PLAYERATTACHMENT is abit tricky to use for transparent sprites. Thats why i dont use CSO sprites on my Banshee, Stamper classes. You need to use a sprites with an alpha chanel with white colour is for transparent colour.

I still don't know how to create this kind of sprites because i've try many time in photoshop but it still become a non-transparent sprites.


All times are GMT -4. The time now is 08:33.

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