Desync\lag glitch??
#1

My gamemode is having a glitch where players don't seem as though they are moving. The only time it seems like they are moving is when they enter a vehicle, they just magically teleport. I have no idea what is causing this help would be appreciated. This video will help what I'm trying to explain.

https://www.youtube.com/watch?v=aMQx...ature=*********

Here is my "OnPlayerStateChange" code not really sure if it is relevant to this glitch or not... but yeah.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(vehicleid) == 476 && (gLoadout[playerid] != CLASS_PILOT || GetPlayerScore(playerid) < 249))
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, COLOR_ERROR, "You need to be a Sergeant to fly a ruslter! Use /rank to see your rank.");
            SendClientMessage(playerid, COLOR_ERROR, "You also need to be a pilot to drive this vehicle, use /kill and select the 'pilot' class");
        }
        if(GetVehicleModel(vehicleid) == 432 && (gLoadout[playerid] != CLASS_PILOT || GetPlayerScore(playerid) < 649))
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, COLOR_ERROR, "You need to be a Major to drive a rhino! Use /rank to see your rank.");
            SendClientMessage(playerid, COLOR_ERROR, "You also need to be a pilot to drive this vehicle, use /kill and select the 'pilot' class");
        }
        if(GetVehicleModel(vehicleid) == 447 && (gLoadout[playerid] != CLASS_PILOT || GetPlayerScore(playerid) < 919))
        {
            SendClientMessage(playerid, COLOR_ERROR, "You need at least a Colonel rank to fly a Sea Sparrow! Use /rank to see your rank.");
            SendClientMessage(playerid, COLOR_ERROR, "You also need to be a pilot to drive this vehicle, use /kill and select the 'pilot' class");
            RemovePlayerFromVehicle(playerid);
        }
        if(GetVehicleModel(vehicleid) == 425 && (gLoadout[playerid] != CLASS_PILOT || GetPlayerScore(playerid) < 1149))
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, COLOR_ERROR, "You need to be a Lieutenant Colonel to fly a hunter! Use /rank to see your rank.");
            SendClientMessage(playerid, COLOR_ERROR, "You also need to be a pilot to drive this vehicle, use /kill and select the 'pilot' class");
        }
        if(GetVehicleModel(vehicleid) == 520 && (gLoadout[playerid] != CLASS_PILOT || GetPlayerScore(playerid) < 1999))
        { // Hydra
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, COLOR_ERROR, "You need to be a Major General before you can fly a hydra! Use /rank to see your rank.");
            SendClientMessage(playerid, COLOR_ERROR, "You also need to be a pilot to drive this vehicle, use /kill and select the 'pilot' class");
        }
    }
    return 1;
}
Help is seriously appreciated.
Reply
#2

OnPlayerUpdate?
Reply
#3

Callback doesn't exist on my game mode.
Reply
#4

Check your filterscripts because that is most definitely the problem.
Reply
#5

I have none running... If I had any others running I would have narrowed it down to that script. Hence why I said "gamemode".
Reply
#6

I'm not sure, but I think that if you don't use OnPlayerUpdate in your gamemode, it's behaviour is like it actually returns 0, so it isn't sending any player updates. Just add this in your gamemode:
pawn Код:
public OnPlayerUpdate( playerid )
    return 1;
Reply
#7

I actually fixed this. It was an include I was using that causes played to desync when they use the menu that the include file comes with.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)