Car system has 1 bug
#3

Quote:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new string[128];
  if(Cars[GetPlayerVehicleID(playerid)][cOwned] == 0)
  {
  format(string,sizeof(string),"[ ! ] ID : %d ' %s ' Price : %d RCASH",GetPlayerVehicleID(playerid),Cars[GetPlayerVehicleID(playerid)][cDescription],Cars[GetPlayerVehicleID(playerid)][cPrice]);
  SendClientMessage(playerid,COLOR_GREY,string);
  return 0;
  }
  if(Cars[GetPlayerVehicleID(playerid)][cOwned] == 1)
  {
  format(string,sizeof(string),"[ ! ] ID : %d ' %s ' Bought by : %s",GetPlayerVehicleID(playerid),Cars[GetPlayerVehicleID(playerid)][cDescription],Cars[GetPlayerVehicleID(playerid)][cOwner]);
  SendClientMessage(playerid,COLOR_GREY,string);
  return 0;
  }
    return 1;
}
Edit all GetPlayerVehicleID(playerid) to vehicleid.
Or again, code in OnPlayerStateChange(PLAYER_STATE_DRIVER) is better, cuz OnPlayerEnterVehicle doesn't get called when using PutPlayerInVehicle or hack in vehicle.
Reply


Messages In This Thread
Car system has 1 bug - by coole210 - 27.07.2009, 20:30
Re: Car system has 1 bug - by coole210 - 27.07.2009, 23:58
Re: Car system has 1 bug - by yezizhu - 28.07.2009, 00:17
Re: Car system has 1 bug - by coole210 - 28.07.2009, 00:28
Re: Car system has 1 bug - by yezizhu - 28.07.2009, 02:35
Re: Car system has 1 bug - by coole210 - 28.07.2009, 14:06
Re: Car system has 1 bug - by coole210 - 28.07.2009, 14:14
Re: Car system has 1 bug - by saiberfun - 28.07.2009, 14:39
Re: Car system has 1 bug - by coole210 - 28.07.2009, 14:41
Re: Car system has 1 bug - by yezizhu - 28.07.2009, 16:48

Forum Jump:


Users browsing this thread: 5 Guest(s)