Spawn points Help - 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: Spawn points Help (
/showthread.php?tid=563230)
Spawn points Help -
NinjahZ - 14.02.2015
Random Spawn points for 2 Teams, would this work?
http://pastebin.com/TWVbPLfR
Re: Spawn points Help -
Sn00Py - 14.02.2015
Okey. I will try to help you if you will provide your 'team' variable. You know .. something like PlayerInfo[playerid][pTeam].
Waiting your response.
But .. you can also read this topic, who helps you to make random spawn points:
https://sampforum.blast.hk/showthread.php?tid=162488
Re: Spawn points Help -
NinjahZ - 14.02.2015
http://pastebin.com/32XzYZpp
Re: Spawn points Help -
FunnyBear - 14.02.2015
This should give you an idea, I took it from my Gamemode and edited it a bit so you can change set the player's interior.
pawn Код:
new Float:RandomSpawns[][] = // Somewhere at the top of your script
{
//{X, Y, Z, FACING, INTERIOR ID}
{1991.7661, -2053.8508, 13.5477, 90.9991, 0}, // Interior ID 0 (Outside)
{1991.7661, -2053.8508, 13.5477, 90.9991, 1}, // Interior ID 2
{1991.7661, -2053.8508, 13.5477, 90.9991, 2} // Interior ID 3
};
pawn Код:
public OnPlayerSpawn(playerid)
{
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
SetPlayerInterior(playerid, RandomSpawns[Random][4]);
SetCameraBehindPlayer(playerid);
return 1;
}
Re: Spawn points Help -
NinjahZ - 14.02.2015
so would i be able to change that a bit? with teams,
like this
http://pastebin.com/c19398kX
Oh no i wont need that, as they are already defined as 0 1 2 3 etc, thanks for your help

+rep
Re: Spawn points Help -
NinjahZ - 15.02.2015
Would this work for the random spawns?
http://pastebin.com/TWVbPLfR