Enter the car when it locked?
#2

OnPlayerEnterVehicle is called when a player is preparing to enter a vehicle, so for example: when a player hits the 'F' key near-by a car.

You can use OnPlayerStateChange, this might be a more appropriate callback if you're forcing a player in to a car, or if you want it to call when they directly enter the vehicle instead of before.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) {
    if(newstate == 2 && oldstate != 2) {
        /* your code here */
        return 0;
    }
   
    return 0;
}
Reply


Messages In This Thread
Enter the car when it locked? - by whitedragon - 31.07.2011, 11:09
Re: Enter the car when it locked? - by Calgon - 31.07.2011, 11:13
Re: Enter the car when it locked? - by whitedragon - 31.07.2011, 13:16
Re: Enter the car when it locked? - by Calgon - 31.07.2011, 13:17
Re: Enter the car when it locked? - by whitedragon - 31.07.2011, 13:22
Re: Enter the car when it locked? - by Calgon - 31.07.2011, 13:22
Re: Enter the car when it locked? - by TouR - 31.07.2011, 14:04
Re: Enter the car when it locked? - by whitedragon - 31.07.2011, 14:43

Forum Jump:


Users browsing this thread: 1 Guest(s)