Quote:
Originally Posted by GordonFreeman (RU)
Simply example:
Code:
new Float:org[3],Float:org1[3]
pev(player,pev_origin,org)
fm_get_aim_origin(player,org1)
new beams = Beam_Create(REFLUX_BEAM,10.0)
Beam_Init(beams,REFLUX_BEAM,10.0)
Beam_PointsInit(beams,org,org1)
Beam_SetColor(beams,{255.0,255.0,255.0})
Beam_SetNoise(beams,50)
creating beam from use origin to user aim origin
|
PHP Code:
stock Beam_Create(const szSpriteName[], const Float: flWidth)
{
new iBeamEntity;
static iszAllocStringCached;
if (iszAllocStringCached || (iszAllocStringCached = engfunc(EngFunc_AllocString, "beam")))
{
iBeamEntity = engfunc(EngFunc_CreateNamedEntity, iszAllocStringCached);
}
if (pev_valid(iBeamEntity))
{
set_pev(iBeamEntity, pev_classname, "beam");
Beam_Init(iBeamEntity, szSpriteName, flWidth);
return iBeamEntity;
}
return FM_NULLENT;
}
As you can see, the Beam_Init gets already pushed when you create.
So you don't gotta put it again