stock CreateNet(Float:firstPoint[3], Float:lastPoint[3], gateId = 0)
{
new ent
new Float:fCenter[3], Float:fSize[3]
new Float:fMins[3], Float:fMaxs[3]
for ( new i = 0; i < 3; i++ )
{
fCenter[i] = (firstPoint[i] + lastPoint[i]) / 2.0
fSize[i] = get_float_difference(firstPoint[i], lastPoint[i])
fMins[i] = fSize[i] / -2.0
fMaxs[i] = fSize[i] / 2.0
}
ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
if (ent) {
countnets++;
engfunc(EngFunc_SetOrigin, ent, fCenter)
set_pev(ent, pev_classname, "JailNet")
dllfunc(DLLFunc_Spawn, ent)
set_pev(ent, pev_movetype, MOVETYPE_FLY)
set_pev(ent, pev_solid, SOLID_TRIGGER)
engfunc(EngFunc_SetSize, ent, fMins, fMaxs) ;
//set task wywyolujacy ShowZoneBox(fMins, fMaxs) fMins, FMaxs trzeba uprzednio na inty przerzucic
} else{
log_amx("CreateNet fail!")
}
}
MOżesz wyrzucić