#1

Who know how can I solve lag of this:

Код HTML:
for(new x = 0; x < 61; x++) 
for(new y = 0; y < 61; y++)
CreateDynamicObject(18864,-3000.0+x*100.0,-3000+y*100,0.0,0.0,0.0,0.0);
Reply
#2

Better use this.
Код:
public OnPlayerSpawn(playerid)
{
    return SnowStatus(playerid, true);
}

SnowStatus(playerid, bool:upaljeno = true)
{
    new FallingSnow;

    if(upaljeno)
    {
        new Float:Position[3];
        GetPlayerCameraPos( playerid, Position[0], Position[1], Position[2]);
        FallingSnow = CreatePlayerObject( playerid, 18864, Position[0], Position[1], Position[2]-5, 0.0, 0.0, 0.0, 300.0 );
        SendClientMessage(playerid, -1, "Snow enabled.");
    }
    else if(!upaljeno)
    {
        DestroyPlayerObject( playerid, FallingSnow);
        SendClientMessage(playerid, -1, "Snow disabled.");
    }
    return true;   
}
Reply
#3

Best method, I believe, is to attach the snow object to the player or their vehicle.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)