Changing player spawn locations. - 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)
+--- Thread: Changing player spawn locations. (
/showthread.php?tid=381596)
Changing player spawn locations. -
MrPlatinum - 30.09.2012
http://forum.sa-mp.com/showthread.ph...14#post2145714
Re: Changing player spawn locations. -
XtremeR - 30.09.2012
you mean random spawns use this tut:
https://sampforum.blast.hk/showthread.php?tid=162488
Re: Changing player spawn locations. -
MrPlatinum - 30.09.2012
Yeah i guess,
But i just want to edit the class spawns for PPC_Trucking.
Instead of spawning at a premade one which came with the gamemode i want to change it to a different area.
Re: Changing player spawn locations. -
XtremeR - 30.09.2012
here u go a simple one
pawn Код:
new Float:RandomSpawns[][] =
{
{x,y,z}, // Randomspawn
{x,y,z}, // Randomspawn
{x,y,z}, // Randomspawn
{x,y,z}, // Randomspawn
{x,y,z}, // Randomspawn
};
pawn Код:
//underonplayerspawn
if(GetPlayerTeam(playerid) == 1)
{
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
}
//more team here and so on!
i hope that helps