Kod dawania:
Spoiler
public fw_touch(ent,id)
{
if(!is_user_alive(id))
return FMRES_IGNORED;
static classname[32];
pev(ent,pev_classname,classname,31);
if(!equali(classname,"amxx_kasa"))
return FMRES_IGNORED;
{
new name[32];
get_user_name(id, name, 31);
server_cmd("mm_givemoney ^"%s^" ^"15^"", name);
}
engfunc(EngFunc_RemoveEntity,ent);
return FMRES_IGNORED;
}
public client_death(killer,victim,weapon,hit,TK)
{
static Float:victim_origin[3], Float:fNewOrigin[3];
pev(victim,pev_origin,victim_origin);
new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString,"info_target"));
fNewOrigin[0] = victim_origin[0] + 40.0;
fNewOrigin[1] = victim_origin[1];
fNewOrigin[2] = victim_origin[2] - 32.0;
engfunc(EngFunc_SetOrigin,ent,fNewOrigin);
if(!pev_valid(ent))
return 0;
engfunc(EngFunc_SetModel,ent,"models/kasa.mdl");
set_pev(ent,pev_classname,"amxx_kasa");
dllfunc(DLLFunc_Spawn, ent);
set_pev(ent,pev_solid,SOLID_BBOX);
set_pev(ent,pev_movetype,MOVETYPE_FLY);
engfunc(EngFunc_SetSize,ent,MINS,MAXS);
engfunc(EngFunc_DropToFloor,ent);
return 0;
}
public fw_touch(ent,id)
{
if(!is_user_alive(id))
return FMRES_IGNORED;
static classname[32];
pev(ent,pev_classname,classname,31);
if(!equali(classname,"amxx_kasa"))
return FMRES_IGNORED;
{
new name[32];
get_user_name(id, name, 31);
server_cmd("mm_givemoney ^"%s^" ^"15^"", name);
}
engfunc(EngFunc_RemoveEntity,ent);
return FMRES_IGNORED;
}
public client_death(killer,victim,weapon,hit,TK)
{
static Float:victim_origin[3], Float:fNewOrigin[3];
pev(victim,pev_origin,victim_origin);
new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString,"info_target"));
fNewOrigin[0] = victim_origin[0] + 40.0;
fNewOrigin[1] = victim_origin[1];
fNewOrigin[2] = victim_origin[2] - 32.0;
engfunc(EngFunc_SetOrigin,ent,fNewOrigin);
if(!pev_valid(ent))
return 0;
engfunc(EngFunc_SetModel,ent,"models/kasa.mdl");
set_pev(ent,pev_classname,"amxx_kasa");
dllfunc(DLLFunc_Spawn, ent);
set_pev(ent,pev_solid,SOLID_BBOX);
set_pev(ent,pev_movetype,MOVETYPE_FLY);
engfunc(EngFunc_SetSize,ent,MINS,MAXS);
engfunc(EngFunc_DropToFloor,ent);
return 0;
}