28.09.2014, 12:50
Quote:
Thanks so much EnforcerDon, I not entirely sure if I know what you mean, but the return value of the INVALID_VEHICLE_ID makes sense. I tried the OnPlayerEnterVehicle but it didn't work when changing seats.
I've gotten round it by ensuring the robber is in a vehicle using this, does this look ok to you, or is there a better/more efficient way around it? Код:
public OnPlayerUpdate(playerid) { if(playerid==robber && IsPlayerInAnyVehicle(playerid)) { switch(GetVehicleModel(GetPlayerVehicleID(playerid))) { case 592: RestrictedCar(playerid,"Andromada"); } } return 1; } Thanks again |
pawn Код:
public OnPlayerEnterVehicel(playerid, vehicleid)
{
if(playerid==robber)
{
if(GetVehicleModel(vehicleid) == 592)
{
RestrictedCar(playerid,vehicleid,"Andromada");
}
}
}
RestrictedCar will be called every time a robber tries to enter an Andromada.
And what exactly do you mean when you say "Could I now safely make the check if they are in a different vehicle", please try to be a little more specific, because I'm missing your point.
If you have any other problems, let me know.
BTW, what kind of server are you working on?