25.05.2012, 16:41
Try this
Also, the general limit of SA-MP is max 1000 objects shown at once
https://sampwiki.blast.hk/wiki/Limits
And show how you create 'NPlayer'
pawn Код:
forward NObjectUpdate(playerid);
public NObjectUpdate(playerid)
{
new Float:pos[3];
GetPlayerPos(playerid,pos[0],pos[1],pos[2]);
for(new i = 0; i < ObjCount; i++)
{
if(GetPlayerVirtualWorld(playerid) == Objects[i][nworld]
&& IsNObjClose(pos[0],pos[1],pos[2],Objects[i][nx],Objects[i][ny],Objects[i][nz],Objects[i][ndraw]))
{
if(!NPlayer[playerid][see][i])
{
NPlayer[playerid][nobj][i] = CreatePlayerObject(playerid,Objects[i][nid],Objects[i][nx],Objects[i][ny],Objects[i][nz],Objects[i][nrx],Objects[i][nry],Objects[i][nrz]);
NPlayer[playerid][see][i] = true;
}
}
else
{
if(NPlayer[playerid][see][i])
{
DestroyPlayerObject(playerid,NPlayer[playerid][nobj][i]);
NPlayer[playerid][see][i] = false;
}
}
}
}
https://sampwiki.blast.hk/wiki/Limits
And show how you create 'NPlayer'