22.08.2011, 10:14
Heey guys,
Is there a way to handle laggers?
I made a dialog for spawn and laggers spawn at 0,0,0:S
Is there a way to handle laggers?
I made a dialog for spawn and laggers spawn at 0,0,0:S
if(GetPlayerPing(playerid) >= 300) SetPlayerPos(playerid, 0.00, 0.00, 0.00); //If ping reaches 300+ then playerid will be teleported to position: 0.00, 0.00, 0.00
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
|
//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.
}
}