19.05.2014, 13:59
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);