OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if (PlayerFaction[playerid] == FACTION_ID && vehicleid == VEHICLE_ID) { ClearAnimations(playerid); } return 1; }
OnPlayerStateChange(playerid, newstate, oldstate) { if (newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) { RemovePlayerFromVehicle(playerid); } return 1; }
Код:
OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if (PlayerFaction[playerid] == FACTION_ID && vehicleid == VEHICLE_ID) { ClearAnimations(playerid); } return 1; } But this stops the player from staying in the car once they enter: Код:
OnPlayerStateChange(playerid, newstate, oldstate) { if (newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) { RemovePlayerFromVehicle(playerid); } return 1; } |