get vehicleid before enter?
#1

im trying to make it so when player try to enter a car, if its a specific car it doesnt let him enter, but my problem is i dont know how to get the vehicleid of the car hes trying to enter. any idea?

somethink like

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_ENTER_VEHICLE_DRIVER)
  {
    new vehicleid = GetPlayerVehicleID(playerid); //but of course not known yet since not in it
    if(vehicleid == testcar1)
    {
      SendClientMessage(playerid,COLOR_BRIGHTRED,"LOCKED..");
      //....
    }
  }
  return 1;
}
seems like it should be an easy solution but im stuck. just need help with getting the vehicle part, any help much appreciated thanks.
Reply


Messages In This Thread
get vehicleid before enter? - by happyface - 03.07.2009, 00:30
Re: get vehicleid before enter? - by ledzep - 03.07.2009, 00:33
Re: get vehicleid before enter? - by yezizhu - 03.07.2009, 00:48
Re: get vehicleid before enter? - by happyface - 03.07.2009, 00:48
Re: get vehicleid before enter? - by yezizhu - 03.07.2009, 00:51
Re: get vehicleid before enter? - by happyface - 03.07.2009, 00:53
Re: get vehicleid before enter? - by ledzep - 03.07.2009, 00:59
Re: get vehicleid before enter? - by yezizhu - 03.07.2009, 01:08
Re: get vehicleid before enter? - by happyface - 03.07.2009, 01:09
Re: get vehicleid before enter? - by yom - 03.07.2009, 01:11

Forum Jump:


Users browsing this thread: 4 Guest(s)