random team spawn - 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: random team spawn (
/showthread.php?tid=475511)
random team spawn -
gotwarzone - 13.11.2013
How do I make a random spawn from each team? What I mean for example is from team_mexicans I want to make 3 random spawn points, From team_biker 3 random spawn point and same with the rest of the teams. Without touching the zoneinfop[][eZone] coz it defines really important things like I posted below (Sample 1)
Sample 1
Код:
new ZoneID[sizeof(ZoneInfo)];
new ZoneAttacker[sizeof(ZoneInfo)] = {-1, ...};
new ZoneAttackTime[sizeof(ZoneInfo)];
Here is the code for spawn point (this only spawn from 1 position) I need the 3 spawn points as I explained.
Код:
new ZoneInfo[][eZone] =
{
{-2814.9235, 86.0277, -2614.9511, 573.7998,TEAM_MEXICANS},
{-2261.0000, -59.9213, -2003.0356, 395.8932,TEAM_BIKER},
{-2818.9230, -327.8485, -2426.9771, 64.0359,TEAM_MAFIA},
{-2524.9636, 571.8009, -2276.9978, 959.5567,TEAM_YAKUZA},
{-1899.0500, 609.7795, -1563.0963, 941.5693,TEAM_HOMELESS},
{-2255.859375, 1022.4609375, -1599.609375, 1280.2734375,TEAM_GROVE}
};
Код:
new ZoneInfo[][eZone] =
{
{-2814.9235, 86.0277, -2614.9511, 573.7998,TEAM_MEXICANS},
{-2261.0000, -59.9213, -2003.0356, 395.8932,TEAM_BIKER},
{-2818.9230, -327.8485, -2426.9771, 64.0359,TEAM_MAFIA},
{-2524.9636, 571.8009, -2276.9978, 959.5567,TEAM_YAKUZA},
{-1899.0500, 609.7795, -1563.0963, 941.5693,TEAM_HOMELESS},
{-2255.859375, 1022.4609375, -1599.609375, 1280.2734375,TEAM_GROVE}
};