I tried to create an entity when you press attack, so far any atempt failed,
The entity should be a ball, wich bounce a little and then stops
PHP Code:
new ball = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString,"info_target"));
set_pev(ball, pev_classname, "ball");
new Float:fOrigin[3];
pev(id, pev_origin, fOrigin);
fOrigin[2] += 30.0;
//get_user_origin(id,origin,3) gives a runtime error 10 :s
new Float:fAngles[3];
pev(id, pev_angles, fAngles);
engfunc(EngFunc_SetModel, ball, ballmodel);
set_pev(ball, pev_angles, fAngles);
set_pev(ball, pev_origin, fOrigin);
set_pev(ball, pev_movetype, MOVETYPE_BOUNCE);
set_pev(ball, pev_velocity, 500)
__________________