AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help]How can I send a tga on map? (https://forums.alliedmods.net/showthread.php?t=229421)

lein 11-07-2013 11:51

[Help]How can I send a tga on map?
 
What message should I send?

As far as I know, we can send a message to show a model & sprite on the map!
such as this:

Send the SPR message
PHP Code:

    // create trail
    
message_beginMSG_BROADCASTSVC_TEMPENTITY )
    
write_byte(TE_BEAMFOLLOW)
    
write_short(ent)        //entity
    
write_short(cache_smoke)    //model
    
write_byte(5)            //10)//life
    
write_byte(3)            //5)//width
    
write_byte(trail[0])            //r
    
write_byte(trail[1])            //g
    
write_byte(trail[2])            //b
    
write_byte(200)            //brightness
    
message_end()    

    
// create effect exp
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY); 
    
write_byte(TE_EXPLOSION); // TE_EXPLOSION
    
write_coord(floatround(entOrigin[0])); // origin x
    
write_coord(floatround(entOrigin[1])); // origin y
    
write_coord(floatround(entOrigin[2])); // origin z
    
write_short(c_cache_nadeexp[CURENT_WEAPON]); // sprites
    
write_byte(40); // scale in 0.1's
    
write_byte(30); // framerate
    
write_byte(14); // flags 
    
message_end(); // message end

    // create effect exp
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY); 
    
write_byte(TE_EXPLOSION); // TE_EXPLOSION
    
write_coord(floatround(entOrigin[0])); // origin x
    
write_coord(floatround(entOrigin[1])); // origin y
    
write_coord(floatround(entOrigin[2])); // origin z
    
write_short(cache_explo); // sprites
    
write_byte(40); // scale in 0.1's
    
write_byte(30); // framerate
    
write_byte(TE_EXPLFLAG_NONE); // flags 
    
message_end(); // message end
    
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)  // Rauchwolke 烟云效果
    
write_byte(5)
    
write_coord(floatround(entOrigin[0])); // origin x
    
write_coord(floatround(entOrigin[1])); // origin y
    
write_coord(floatround(entOrigin[2])); // origin z
    
write_short(cache_smoke)
    
write_byte(35)
    
write_byte(5)
    
message_end() 

Send the decal message
PHP Code:

    message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_WORLDDECAL// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
write_byte(ArrayGetCell(g_bleeding_decalsrandom_num(0ArraySize(g_bleeding_decals) - 1)) + (g_IsModCZ 12)) // decal number (offsets +12 for CZ)
    
message_end() 

Now I want to send a tga to a origin,what message should I use?
How do I use it?
what argument?

MPNumB 11-08-2013 11:02

Re: [Help]How can I send a tga on map?
 
I don't think that's possible. I'd suggest converting TGA to SPR.

// EDIT:

.bmp can be converted to .spr with spritexplorer program, and tga to bmp, I think you should google that.


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

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