Teleport help
#1

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?
Reply
#2

pawn Код:
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);
}
EDIT:

Quote:
Originally Posted by WarriorEd22
Посмотреть сообщение
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.
He asked how to teleport with vehicle i gave an example above

pawn Код:
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);
}
Reply
#3

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.
Reply
#4

Create one Pickup :

Top of Script


pawn Код:
new Pickup;

OnPlayerPickUpPickup:


pawn Код:
public OnPlayerPickUpPickup(playerid,pickupid);
{
    if(pickupid == Pickup) SetPlayerPos(playerid, "Coordinates"), SetPlayerInterior(playerid, 0);
    return 1;
}
OnGameModeInit

pawn Код:
Pickup = CreatePickup(ID, 1, "Coordinates", -1);
Only One Example.Work out with your contact details now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)