Dynamicban.
#define FILTERSCRIPT
#include <a_samp>
#include streamer
#define ALAPDISTANCE 1000.0
#define MAX_OBJECT 9000
#define NINCS -1
#include <streamer>
#include <foreach>
new
VW = NINCS,
Interior = NINCS,
Player = NINCS,
Float:Distance = 0.0,
Iterator:Object<MAX_OBJECT>
;
stock SzerverObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = ALAPDISTANCE)
Iter_Add(Object, CreateDynamicObject(modelid, x, y, z, rx, ry, rz, (VW != NINCS ? VW : worldid), (Interior != NINCS ? Interior : interiorid), (Player != NINCS ? Player : playerid), (Distance != 0.0 ? Distance : distance)));
#define CreateObject(%1) SzerverObject(%1)
#pragma tabsize 0
public OnPlayerConnect(playerid)
{
CallLocalFunction("ObjectKiszedes", "i", playerid);
return true;
}
forward ObjectKiszedes(playerid);
public ObjectKiszedes(playerid)
{
return true;
}
public OnFilterScriptInit()
{
print("[DEBUG]: objectek betoltese");
Streamer_TickRate(2000);
Streamer_VisibleItems(STREAMER_TYPE_OBJECT, 2000);
/*------------------------ [ Objectek ] ------------------------*/
/*------------------------ [ Objectek vége ] ------------------------*/
print("[DEBUG]: objectek - objectek torlese");
new i = NINCS;
for(;++i < MAX_PLAYERS;)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
CallLocalFunction("ObjectKiszedes", "i", i);
}
return true;
}
public OnFilterScriptExit()
{
foreach(Object, x) DestroyDynamicObject(x);
Iter_Clear(Object);
return true;
}