how to check whether the vehicle is a player?
#3

Want to prevent the player from entering a car/vehicle? Then use OnPlayerEnterVehicle. GetPlayerPos and SetPlayerPos.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new Float:pos[4];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    GetPlayerFacingAngle(playerid, pos[3]);
    SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    SetPlayerFacingAngle(playerid, pos[3]);
    return 1;
}
..

GetPlayerVehicleID. Returns 0 if player isn't in a vehicle. Returns the vehicle ID That the player is in it.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)