Vehicle interior
#3

pawn Код:
//At the top of your script:
new PlayerInCamper[MAX_PLAYERS];

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_PASSENGER)
    {
        new veh = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(veh) == 483) //If player entered a camper
        {
            //Teleport player to camper interior.
            PlayerInCamper[playerid] = veh; //This tells us what vehicle id the player is in, so we can teleport them when they exit.
        }
    }
    return 1;
}

//When the player exits the camper:
PutPlayerInVehicle(playerid, PlayerInCamper[playerid], 1);
RemovePlayerFromVehicle(playerid);
I hope this kind of explains it to you.
Reply


Messages In This Thread
Vehicle interior - by luckie12 - 19.05.2014, 10:57
Re: Vehicle interior - by luckie12 - 19.05.2014, 13:37
Re: Vehicle interior - by Threshold - 19.05.2014, 13:59
Re: Vehicle interior - by luckie12 - 20.05.2014, 18:30
Re: Vehicle interior - by luckie12 - 21.05.2014, 14:11

Forum Jump:


Users browsing this thread: 1 Guest(s)