ehemmm. sry 4 double post.
i think i forgot all about amxxxx....
knows anyone whats here the problem ?
PHP Code:
public grenade_throw(id, ent, weap)
{
if (weap == CSW_HEGRENADE && nadewars == 1 )//&& cs_get_user_team(id) == CS_TEAM_T)
{
set_task(3.0,"give_nade",id)
}
}
public give_nade(id)
{
if(is_user_alive(id))
{
give_item(id, "weapon_hergrenade" )
}
client_print(id,print_chat,"DEBUG : TASK WORKS. YOU GOT 1 HE")
}
problem : user dosent get any HEs.. my task/debug print works.
tried with fm_give_item too but the same :
PHP Code:
stock fm_give_item(id,const item[]){
static ent;
ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, item));
if(!pev_valid(ent)) return;
static Float:originF[3];
pev(id, pev_origin, originF);
set_pev(ent, pev_origin, originF);
set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN);
dllfunc(DLLFunc_Spawn, ent);
static save;
save = pev(ent, pev_solid);
dllfunc(DLLFunc_Touch, ent, id);
if(pev(ent,pev_solid) != save)
return;
engfunc(EngFunc_RemoveEntity, ent);
}
__________________