How can i handle laggers?
#7

Quote:
Originally Posted by admigo
View Post
No. I just want that the laggers spawn at the normal spawn not at 0,0,0. Because they have so much lag they spawn at 0,0,0 and not at normal place:S
Ohhh, well there are a few ways to approach this.. Perhaps try a one-time timer that checks if player is near position 0.00, 0.00, 0.00 after 8 seconds that the player spawned. For Example:

pawn Code:
//Somewhere on top of your script or just above the Callback
forward CheckSpawnPosition(playerid);


//Put this under OnPlayerSpawn
SetTimerEx("CheckSpawnPosition", 8000, false, "i", playerid); //time is in milliseconds (8000 Milliseconds = 8 Seconds)


//Somewhere in between all Callbacks (public's)
public CheckSpawnPosition(playerid)
{
    new Float:Pos_Y, Float:Pos_X, Float:Pos_Z;
    GetPlayerPos(playerid, Pos_Y, Pos_X, Pos_Z);
    if(Pos_Y < 500 && Pos_Y > -500 && Pos_X < 500 && Pos_X > 500)
    {
        SetPlayerPos(playerid, 1000.00, -1000.00, 25.00); //Put your desired spawn location here.
    }
}
This Should probably do it, haven't tested it but I ammuse it should work.


FIRST EDIT: Forgot but Added the ; symbol behind the forward.
Reply


Messages In This Thread
How can i handle laggers? - by Admigo - 22.08.2011, 10:14
Re: How can i handle laggers? - by Improvement™ - 22.08.2011, 10:30
Re: How can i handle laggers? - by rbN. - 22.08.2011, 10:32
Re: How can i handle laggers? - by Admigo - 22.08.2011, 10:33
Re: How can i handle laggers? - by Improvement™ - 22.08.2011, 10:41
Re: How can i handle laggers? - by Admigo - 22.08.2011, 10:46
Re: How can i handle laggers? - by Improvement™ - 22.08.2011, 10:58

Forum Jump:


Users browsing this thread: 1 Guest(s)