public Halal()
{
new id = read_data(1)
new x = read_data(2)
new dFajta
if(id == x || id == 0 || !jBejelentkezve[id])
{
return
}
XP[id] += random_num(3, 5)
Oles[id]++
if(XP[id] >= SzintXP[Szint[id]])
{
Szint[id]++
Pontok[id] += 2
new Nev[32]
get_user_name(id, Nev, 31)
print_color(0, "%s!y Gratulálunk !t%s!y-nak/nek! !g%d!y szintű lett!", Prefix, Nev, Szint[id])
}
new RandomSzam = random_num(0, 1000)
if(Event == 1 && 10 > RandomSzam || Event == 2 && 10 > RandomSzam)
{
if(Vip[id] > 0 || Targy[id][1] > 0)
{
if(Event == 1)
LadaKap(id)
else if(Event == 2)
KulcsKap(id)
}
else
{
if(Event == 1)
dFajta = 4
else if(Event == 2)
dFajta = 3
}
}
else if(630 > RandomSzam)
{
if(Vip[id] > 0 || Targy[id][1] > 0)
{
CsomagKap(id)
}
else
{
dFajta = 2
}
}
else if(1001 > RandomSzam)
{
if(Vip[id] > 0 || Targy[id][1] > 0)
{
AranyKap(id)
}
else
{
dFajta = 1
}
}
if(dFajta == 0)
{
return
}
new Float:Origin[3]
pev(x, pev_origin, Origin)
new Ent = engfunc(EngFunc_CreateNamedEntity, InfoT)
Origin[2] -= 36.0
engfunc(EngFunc_SetOrigin, Ent, Origin)
set_pev(Ent, pev_classname, DropAdat[dFajta][0])
new Mdl[86], Ido[20]
num_to_str(get_systime()+20, Ido, 19)
formatex(Mdl, charsmax(Mdl), "models/%s", DropAdat[dFajta][1])
engfunc(EngFunc_SetModel, Ent, Mdl)
dllfunc(DLLFunc_Spawn, Ent)
set_pev(Ent, pev_health, id)
entity_set_float(Ent, EV_FL_health, float(id))
set_pev(Ent, pev_netname, Ido)
set_pev(Ent, pev_solid, SOLID_BBOX)
set_pev(Ent, pev_movetype, MOVETYPE_NONE)
engfunc(EngFunc_SetSize, Ent, { -23.160000, -13.660000, -0.050000 }, { 11.470000, 12.780000, 6.720000 })
engfunc(EngFunc_DropToFloor, Ent)
print_color(id, "%s!y Az ellenségből esett egy tárgy! Van!t 20!y másodperced, hogy felvedd!", Prefix)
SQL_jFrissites(id)
}