Hi,
i wanted to catch the origins of users view offset(Aim origins) to spawn my sprite, but like ever i have a problem
the offset/origins are not correct.
PHP Code:
public ClientCommand_CreateMagic ( const Player, const Level, const Cid )
{
if ( !cmd_access( Player, Level, Cid, 1 ) )
{
return PLUGIN_HANDLED;
}
new Float:Origin[3];
new Entity;
pev(Player,pev_v_angle,Origin)
if ( ( Entity = create_entity( "info_target" ) ) )
{
set_pev( Entity, pev_classname, gMagicBallClassname );
engfunc( EngFunc_SetSize , Entity, Float:{ -311.0, -1.0, -1.0 }, Float:{ 311.0, 1.0, 1.0 } );
engfunc( EngFunc_SetOrigin, Entity, Origin );
set_pev( Entity, pev_effects, EF_BRIGHTFIELD );
set_pev( Entity, pev_solid, SOLID_BBOX );
set_pev( Entity, pev_movetype, MOVETYPE_TOSS );
set_pev( Entity, pev_owner, Player );
set_pev( Entity, pev_nextthink, get_gametime() + 0.1 );
}
return PLUGIN_HANDLED_MAIN;
}
&& when i use the command to spawn the ball, i got crashes

no error, nothing in log. my game will be freezed.