Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new MaxVehicleSeats[] = {
- 4, 1, 1, 1, 4, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 4, 1, 4, 1, 4, 4, 1, 1, 1, 1, 4, 4, 4, 1,
- 1, 7, 1, 1, 1, 0, 1, 7, 4, 1, 4, 1, 1, 1, 1, 4, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 4,
- 4, 1, 1, 1, 1, 1, 1, 4, 4, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 4, 3, 1, 1, 1, 4, 1,
- 1, 4, 1, 4, 1, 1, 1, 1, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 7, 7, 1, 4, 1, 1, 1, 1, 1, 4, 4,
- 1, 1, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 1, 1, 1, 1, 4, 4, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
- 4, 4, 1, 4, 1, 0, 4, 1, 1, 1, 1, 0, 0, 7, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1, 1, 4, 1, 0, 0, 0,
- 4, 0, 0
- };
- new Float: vEnterPos[MAX_PLAYERS][4];
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(ispassenger)
- {
- GetPlayerPos(playerid, vEnterPos[playerid][0], vEnterPos[playerid][1], vEnterPos[playerid][2]);
- GetPlayerFacingAngle(playerid, vEnterPos[playerid][3]);
- }
- return true;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_PASSENGER)
- {
- if(MaxVehicleSeats[(GetVehicleModel(GetPlayerVehicleID(playerid)) - 400)] < GetPlayerVehicleSeat(playerid))
- {
- ClearAnimations(playerid);
- SetPlayerPos(playerid, vEnterPos[playerid][0], vEnterPos[playerid][1], vEnterPos[playerid][2]);
- SetPlayerFacingAngle(playerid, vEnterPos[playerid][3]);
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement