28.07.2015, 20:55
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.
Help is seriously appreciated.
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;
}