How DO I Do this?
#1

yes I already searched.


how do I make it so when some one enters a vehicle their car auto locks, and when the exit their car it auto unlocks.
Reply
#2

you did a REALLY shitty search then. This topic was discussed 3 days ago.
Reply
#3

OnPlayerStateChange && PLAYER_STATE_DRIVER = SetVehicleParamsForPlayer

OnPlayerExitVehicle call SetVehicleParamsForPlayer again.
Reply
#4

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER)
  {
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
      SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,0,1);
    }
  }
  return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    SetVehicleParamsForPlayer(vehicleid,i,0,0);
  }
  return 1;
}
Try this
Reply
#5

Quote:
Originally Posted by kaisersouse
you did a REALLY shitty search then. This topic was discussed 3 days ago.
wow that was really mean and uncalled for.


Quote:
Originally Posted by Sneaky.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER)
  {
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
      SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,0,1);
    }
  }
  return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    SetVehicleParamsForPlayer(vehicleid,i,0,0);
  }
  return 1;
}
Try this
It dident work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)