SA-MP Forums Archive
[UNSOLVED] Spawn in vehicles - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [UNSOLVED] Spawn in vehicles (/showthread.php?tid=169095)



[SOLVED] Spawn in vehicles - Nameless303 - 18.08.2010

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


Re: [UNSOLVED] Spawn in vehicles - AK47317 - 18.08.2010

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);
    }



Re: [UNSOLVED] Spawn in vehicles - Nameless303 - 18.08.2010

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);
    }
}



Re: [UNSOLVED] Spawn in vehicles - Retardedwolf - 18.08.2010

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


Re: [UNSOLVED] Spawn in vehicles - Nameless303 - 18.08.2010

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!