Streamer Problem
#8

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
Try this

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;
            }
        }
    }
}
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'
I will have to give that a try when i get back later.

Heres my NPlayer array/enum
pawn Код:
enum player_data
{
    nobj[MAX_N_OBJECTS],
    bool:see[MAX_N_OBJECTS]
}
new NPlayer[MAX_PLAYERS][player_data];
I know about the limits, but i have no problem with limits in the areas of the objects are as it creates the closest objects and destroys them as they go away. only thing i could think of is that the objects are not getting destroyed and then hits the object limit and causes the player not to see anymore playerobjects.
Reply


Messages In This Thread
Streamer Problem - by nickdodd25 - 19.05.2012, 02:58
Re: Streamer Problem - by nickdodd25 - 21.05.2012, 00:02
Re: Streamer Problem - by nickdodd25 - 25.05.2012, 02:03
Re: Streamer Problem - by Ajez - 25.05.2012, 02:15
Re: Streamer Problem - by Makaveli93 - 25.05.2012, 04:11
Re: Streamer Problem - by nickdodd25 - 25.05.2012, 16:28
Re: Streamer Problem - by MadeMan - 25.05.2012, 16:41
Re: Streamer Problem - by nickdodd25 - 25.05.2012, 16:54

Forum Jump:


Users browsing this thread: 1 Guest(s)