Help with changing player spawn pos - 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: Help with changing player spawn pos (
/showthread.php?tid=467911)
Help with changing player spawn pos -
Battlezone - 05.10.2013
Hi everybody,
I have a tdm game mode with 7 teams and capturable zones, all what i want to do is to make an /ss cmd that allow you to change spawn place on next death ( the spawn places are only the zones captured by your team) , then if your team looses that zone you can't spawn in it and you spawn at your base
these are the default base spawn postions :
Код:
new Float:USSpawn[][] =
{
{-244.2477,2709.2261,62.6875},
{-284.6496,2656.0845,62.7245},
{-235.1607,2651.1404,62.7570}
};
on player spawn :
Код:
if(gTeam[playerid] == TEAM_USA)
{
new rand = random(sizeof(USSpawn));
SetPlayerPos(playerid, USSpawn[rand][0], USSpawn[rand][1], USSpawn[rand][2]);
SetPlayerSkin(playerid, 287);
}