OnVehicleStreamIn Problem
#1

So basically I'm making a robbing mission when you enter a certain vehicle ID, but I only want the player to be able to rob it once, so I made a global variable AlreadyRobbed, when the player gets in the vehicle AlreadyRobbed[playerid] = 1;, if the player exits the vehicle before the mission ends I want it to lock him out of the vehicle with SetVehicleParamsForPlayer

So I've got it like this

pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
  if(AlreadyRobbed[forplayerid] == 1)
  {
    SetVehicleParamsForPlayer(75,forplayerid,0,1);
  }
  return 1;
}
The problem is that this only works if the player drives a little while then gets out, but if the player just gets in and out without actually driving anywhere it doesn't lock it and his wanted level keeps going up and the mission keeps starting over.

I can't get SetVehicleParamsForPlayer to work anywhere else and unless I'm just misunderstanding the wiki page OnVehicleStreamIn is the only callback SetVehicleParamsForPlayer works in now? So how can I get around this, is this just a problem with this callback?

Hope I explained it well enough.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)