[UNSOLVED] Spawn in vehicles
#1

Hello,

For a server I'm working on, I wan't to teleport all players in the server to one place and then place them automatically in the cars / planes / w/e I placed there. (Somewhat like in Mini-Missions)

If anyone can help me,
Thank you!
Alex
Reply
#2

put this under ur teleport command

pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
       {
            PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
            SetVehiclePos(GetPlayerVehicleID(playerid), X , Y , Z);
SetVehicleFacingAngle(GetPlayerVehicleID(playerid), Angle);
    }
Reply
#3

It has to teleport ALL players when the cmd is typed by an admin, so based on your code I suggest it's something like this?
pawn Код:
for(new i=0;i <MAX_PLAYERS;i++)
{
       if(GetPlayerState(i) != PLAYER_STATE_DRIVER)
       {
            PutPlayerInVehicle(i, xxxx, 0); //I don't know what to fill in there, because the player has to go in car that's already there...
            //SetVehiclePos(GetPlayerVehicleID(playerid), X , Y , Z);
            //SetVehicleFacingAngle(GetPlayerVehicleID(playerid), Angle);
    }
}
Reply
#4

Create the vehicles. Loop the players. Put the players in their playerid's vehicle.
Reply
#5

Quote:
Originally Posted by EllipseRage
Посмотреть сообщение
Create the vehicles. Loop the players. Put the players in their playerid's vehicle.
Thanks, that brought me to a idea!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)