AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Create Grenade Black Hole Decal (https://forums.alliedmods.net/showthread.php?t=249718)

HENNESSY 10-10-2014 17:12

Create Grenade Black Hole Decal
 
Can someone provide me a code which will create a smaller grenade explosion black hole decal where i'm aiming?


Thanks A lot! :)

usaexelent 10-11-2014 08:41

Re: Create Grenade Black Hole Decal
 
Just go through decal list and perhaps you will find the needed decal.

HENNESSY 10-11-2014 09:28

Re: Create Grenade Black Hole Decal
 
Quote:

Originally Posted by usaexelent (Post 2209798)
Just go through decal list and perhaps you will find the needed decal.

Where i can find the decal list exactly?

usaexelent 10-11-2014 10:07

Re: Create Grenade Black Hole Decal
 
https://forums.alliedmods.net/showthread.php?t=20448

HENNESSY 10-11-2014 15:34

Re: Create Grenade Black Hole Decal
 
Quote:

Originally Posted by usaexelent (Post 2209811)

Can you give me a code exmaple of how to use it?

usaexelent 10-11-2014 17:56

Re: Create Grenade Black Hole Decal
 
PHP Code:

    new decalnum[4] = 
    {
        
7,
        
8,
        
26,
        
27
    
}
    
    
message_begin(MSG_BROADCAST ,SVC_TEMPENTITY//message begin
    
write_byte(TE_WORLDDECAL)

    
engfunc(EngFunc_WriteCoord,origin[0] + random_float(0.0,5.0))
    
engfunc(EngFunc_WriteCoord,origin[1] + random_float(0.0,5.0))
    
engfunc(EngFunc_WriteCoord,origin[2] + random_float(0.0,5.0))
    
write_byte(decalnum[random(sizeof decalnum)]) // texture index of precached decal texture name
    
message_end() 


HENNESSY 10-11-2014 18:04

Re: Create Grenade Black Hole Decal
 
Quote:

Originally Posted by usaexelent (Post 2209970)
PHP Code:

    new decalnum[4] = 
    {
        
7,
        
8,
        
26,
        
27
    
}
    
    
message_begin(MSG_BROADCAST ,SVC_TEMPENTITY//message begin
    
write_byte(TE_WORLDDECAL)

    
engfunc(EngFunc_WriteCoord,origin[0] + random_float(0.0,5.0))
    
engfunc(EngFunc_WriteCoord,origin[1] + random_float(0.0,5.0))
    
engfunc(EngFunc_WriteCoord,origin[2] + random_float(0.0,5.0))
    
write_byte(decalnum[random(sizeof decalnum)]) // texture index of precached decal texture name
    
message_end() 


Thank you bro! :)

usaexelent 10-11-2014 18:30

Re: Create Grenade Black Hole Decal
 
PHP Code:

    message_begin(MSG_BROADCAST ,SVC_TEMPENTITY//message begin 
    
write_byte(TE_WORLDDECAL
    
engfunc(EngFunc_WriteCoord,origin[0]) // Origin in float,  you can change function to take integer value
    
engfunc(EngFunc_WriteCoord,origin[1]) 
    
engfunc(EngFunc_WriteCoord,origin[2]) 
    
write_byte(26// texture index of precached decal texture name 
    
message_end() 

I took last code from one of my plugins with out thinking, it had a lot of thing you don't needed, this one is simpler.

HENNESSY 10-11-2014 20:12

Re: Create Grenade Black Hole Decal
 
Quote:

Originally Posted by usaexelent (Post 2209982)
PHP Code:

    message_begin(MSG_BROADCAST ,SVC_TEMPENTITY//message begin 
    
write_byte(TE_WORLDDECAL
    
engfunc(EngFunc_WriteCoord,origin[0]) // Origin in float,  you can change function to take integer value
    
engfunc(EngFunc_WriteCoord,origin[1]) 
    
engfunc(EngFunc_WriteCoord,origin[2]) 
    
write_byte(26// texture index of precached decal texture name 
    
message_end() 

I took last code from one of my plugins with out thinking, it had a lot of thing you don't needed, this one is simpler.

I know i already changed your first code :)


All times are GMT -4. The time now is 17:34.

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