VERY WEIRD VEHICLE BUGS!
#1

Okay so, I've made a server and when i started testing it inoticed this weird bug, if i teleport a guy somewhere and put him in vehicle i see him standing on top of it and doesn't move, he sees me doing the same, Sometimes a guy enters car and i see car standing and him running in fast speed around like airbreaking, anyone knows why? Please help me this bug screws my server up!, If a new player connects he sees people standing on top of vehicles!
Reply
#2

I have never seen that. Check your OnPlayerUpdate.
Reply
#3

pawn Code:
public OnPlayerUpdate(playerid)
{
  if(!IsPlayerConnected(playerid)) return 0;
  new gun = GetPlayerWeapon(playerid);

  if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  {
    if(gun == 28 || gun == 29 || gun == 32)
    {
      SetPlayerArmedWeapon(playerid,0);
      return 0;
    }
    }
    if(IsPlayerInArea2(playerid,-1517.853, -1622.146, 183.7855, 77.27145))
    {
    SetPlayerArmedWeapon(playerid,0);
    }
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
      SetPlayerArmedWeapon(playerid,0);
    }
    if(InMarathon[playerid] == 1 || InRace[playerid] == 1)
    {
        SetPlayerArmedWeapon(playerid,0);
    }
    return 1;
}
Here.
Reply
#4

OnPlayerUpdate is a function called by connected players, no need for a connection check.

I don't think tho' your OnPlayerUpdate function should create any problems, however for testing, just comment the whole function out and see whether the problem still occurs.
Reply
#5

pawn Code:
public OnPlayerUpdate(playerid)
{
  new gun = GetPlayerWeapon(playerid);

  if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  {
    if(gun == 28 || gun == 29 || gun == 32)
    {
      SetPlayerArmedWeapon(playerid,0);
      return 1;
    }
    }
    if(IsPlayerInArea2(playerid,-1517.853, -1622.146, 183.7855, 77.27145))
    {
    SetPlayerArmedWeapon(playerid,0);
    }
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
      SetPlayerArmedWeapon(playerid,0);
    }
    if(InMarathon[playerid] == 1 || InRace[playerid] == 1)
    {
        SetPlayerArmedWeapon(playerid,0);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)