Something like this?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
new gBall[33];
public plugin_init() {
register_plugin(" ", " ", " ");
RegisterHam(Ham_Spawn, "id", "player_spawn", 1);
}
public plugin_precache() {
precache_model("models/GiantBall.mdl");
}
public player_spawn(id) {
if(!is_user_alive(id))
{
return PLUGIN_HANDLED;
}
SetBall(id)
return PLUGIN_HANDLED;
}
public SetBall(id) {
gBall[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
set_pev(gBall[id], pev_movetype, MOVETYPE_FOLLOW)
set_pev(gBall[id], pev_aiment, id)
set_pev(gBall[id], pev_rendermode, kRenderNormal)
engfunc(EngFunc_SetModel, gBall[id], "models/GiantBall.mdl")
}
It compiles well but i don't have the ball model to test it now.