| Pelipoika |
10-08-2015 07:48 |
[TF2] tf_generic_bomb explosion stock
A quick and easy way to cause an explosion.
PHP Code:
Explode(flPos, 50.0, 500.0, "halloween_explosion", "ui/duel_challenge_rejected_with_restriction.wav");
stock void Explode(float flPos[3], float flDamage, float 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"); }
|