26.04.2012, 00:12
So I made a boxed off area with cars inside of it. I want to be able to teleport out of the boxed area with the car. Can anybody help?
if(IsPlayerInAnyVehicle(playerid)) //checks if player is in any vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), CoordX, CoordY, CoordZ);
}
else //else if player is not in any vehicle
{
SetPlayerPos(playerid, CoordX, CoordY, CoordZ);
}
Make a checkpoint where if you go into that checkpoint with you vehicle, you will automatically teleport to your desired location while you're still in your vehicle.
|
if(IsPlayerInAnyVehicle(playerid)) //checks if player is in any vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), CoordX, CoordY, CoordZ);
}
else //else if player is not in any vehicle
{
SetPlayerPos(playerid, CoordX, CoordY, CoordZ);
}
new Pickup;
public OnPlayerPickUpPickup(playerid,pickupid);
{
if(pickupid == Pickup) SetPlayerPos(playerid, "Coordinates"), SetPlayerInterior(playerid, 0);
return 1;
}
Pickup = CreatePickup(ID, 1, "Coordinates", -1);