AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [TF2] tf_generic_bomb explosion stock (https://forums.alliedmods.net/showthread.php?t=272874)

Pelipoika 10-08-2015 07:48

[TF2] tf_generic_bomb explosion stock
 
A quick and easy way to cause an explosion.

PHP Code:

Explode(flPos50.0500.0"halloween_explosion""ui/duel_challenge_rejected_with_restriction.wav");

stock void Explode(float flPos[3], float flDamagefloat flRadius, const char[] strParticle, const char[] strSound)
{
    
int iBomb CreateEntityByName("tf_generic_bomb");
    
DispatchKeyValueVector(iBomb"origin"flPos);
    
DispatchKeyValueFloat(iBomb"damage"flDamage);
    
DispatchKeyValueFloat(iBomb"radius"flRadius);
    
DispatchKeyValue(iBomb"health""1");
    
DispatchKeyValue(iBomb"explode_particle"strParticle);
    
DispatchKeyValue(iBomb"sound"strSound);
    
DispatchSpawn(iBomb);

    
AcceptEntityInput(iBomb"Detonate");




All times are GMT -4. The time now is 18:36.

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