Wierd Lag
#1

Im experiencing wierd lag with my server, just to give you an example of two commands

Код:
CMD:left(playerid)
{
	if(!(PlayerInfo[playerid][pAdmin] >= 4)) return SendClientMessage(playerid, COLOR_ORANGE, "** You're not premited");
	if(!IsPlayerConnected(playerid)) return 1;
    GetPlayerPos(playerid, slx, sly, slz);

	if(GetPlayerState(playerid) == 2)
	{
        SetVehiclePos(GetPlayerVehicleID(playerid),slx,sly-2,slz);
	}
	else
	{
        SetPlayerPos(playerid, slx,sly-2, slz);
	}
	SendClientMessage(playerid, COLOR_ORANGE, "** You have been moved left.");
    return 1;
}

CMD:right(playerid)
{
	if(!(PlayerInfo[playerid][pAdmin] >= 4)) return SendClientMessage(playerid, COLOR_ORANGE, "** You're not premited");
	if(!IsPlayerConnected(playerid)) return 1;
    GetPlayerPos(playerid, slx, sly, slz);

	if(GetPlayerState(playerid) == 2)
	{
        SetVehiclePos(GetPlayerVehicleID(playerid),slx,sly+2,slz);
	}
	else
	{
        SetPlayerPos(playerid, slx,sly+2, slz);
	}
	SendClientMessage(playerid, COLOR_ORANGE, "** You have been moved right.");
    return 1;
}
They're the same, but the /right takes 0.1 seconds to excecute and /left takes more than 5 seconds to work, anyone has any idea why?
Reply


Forum Jump:


Users browsing this thread: