For some reason when this object gets created, if you touch it, you get pushed into the air, and die. Trying to find a way to fix that, but no available.
PHP Code:
GetEntPropVector(client, Prop_Send, "m_vecOrigin", location);
location[2] += 120.0;
new Float:vel[3];
vel[0] = GetRandomFloat(-2000.0, 2000.0);
vel[1] = GetRandomFloat(-2000.0, 2000.0);
vel[2] = GetRandomFloat(400.0, 800.0);
new entity = CreateEntityByName("prop_fuel_barrel");
DispatchKeyValue(entity, "model", MODEL_BARREL);
DispatchKeyValue(entity, "BasePiece", MODEL_BARRELB);
DispatchKeyValue(entity, "FlyingPiece01", MODEL_BARRELA);
DispatchKeyValue(entity, "FlyingParticles", "barrel_fly");
DispatchKeyValue(entity, "DetonateParticles", "weapon_pipebomb");
DispatchKeyValue(entity, "DetonateSound", "BaseGrenade.Explode");
DispatchSpawn(entity);
SetEntityMoveType(entity, MOVETYPE_VPHYSICS);
TeleportEntity(entity, location, NULL_VECTOR, vel);
ActivateEntity(entity);
__________________