need help with randomspawn
#8

yeah i did but now all the classes spawn at 2 loactions... 1 in Lv and 1 in grove street..... how to fix this? here this is wut i have now...
Код:
new Float:RandomSpawnTeam1[][] = // StreetRacers
{
    // Positions, (X, Y, Z and Facing Angle)
    {1048.4546,1928.2059,10.8203,261.0777},
    {2497.2693,-1676.9578,13.3398,23.6501},
    {2497.2693,-1676.9578,13.3398,23.6501}
};

new Float:RandomSpawnTeam2[][] = // Police
{
    // Positions, (X, Y, Z and Facing Angle)
    {2264.9895,2457.2261,10.8203,183.2561},
    {2264.9895,2457.2261,10.8203,183.2561},
    {2264.9895,2457.2261,10.8203,183.2561}
};
new Float:RandomSpawnTeam3[][] = // Drifters
{
    // Positions, (X, Y, Z and Facing Angle)
    {-2244.5742,-2303.5190,30.0467,252.3967},
    {-2244.5742,-2303.5190,30.0467,252.3967},
    {-2244.5742,-2303.5190,30.0467,252.3967}
};
new Float:RandomSpawnTeam4[][] = // Mafia
{
    // Positions, (X, Y, Z and Facing Angle)
    {2822.4297,895.8810,10.7500,8.5160},
    {-1010.4442,-699.1964,32.0078,6.3033},
    {-2217.8198,2336.1533,7.5469,129.2003}
};
new Float:RandomSpawnTeam5[][] = // Bikers
{
    // Positions, (X, Y, Z and Facing Angle)
    {2317.5906,-1527.5520,25.3438,275.5380},
    {2317.5906,-1527.5520,25.3438,275.5380},
    {2317.5906,-1527.5520,25.3438,275.5380}
};
new Float:RandomSpawnTeam6[][] = // Stunters
{
    // Positions, (X, Y, Z and Facing Angle)
    {-1354.0376,-239.9485,14.1823,325.2208},
    {1332.6597,1362.7931,10.8766,263.7629},
    {422.4953,2531.2754,16.6155,178.5320}
and this:
Код:
public OnGameModeInit()
{
	SetGameModeText("[DC] UnderGround Drift Central");
	// streetracers class
	AddPlayerClass(105,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Streetracers member (1)
	AddPlayerClass(106,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Streetracers member (2)
    AddPlayerClass(107,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Streetracers member (3)
   	AddPlayerClass(115,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Streetracers member (4)
	AddPlayerClass(108,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Streetracers member (5)
	// police class
	AddPlayerClass(280,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Police Officer (1)
    AddPlayerClass(287,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Police Officer (2)
    AddPlayerClass(282,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Police Officer (3)
	// drifters class
	AddPlayerClass(173,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Drifters (1)
	AddPlayerClass(174,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Drifters (2)
    AddPlayerClass(175,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Drifters (3)
	// mafia class
	AddPlayerClass(111,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Mafia (1)
	AddPlayerClass(112,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Mafia (2)
	AddPlayerClass(113,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Mafia (3)
	AddPlayerClass(124,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Mafia (4)
	// bikers class
	AddPlayerClass(247,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Bikers (1)
	AddPlayerClass(248,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Bikers (2)
	AddPlayerClass(254,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); //Bikers (3)
	// stunters class
	AddPlayerClass(121,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // stunters (1)
	AddPlayerClass(122,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // stunters (2)
	AddPlayerClass(116,0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // stunters (3)
and this:
Код:
if(gTeam[playerid] == STREETRACERS) {
    new
    Random = random(sizeof(RandomSpawnTeam1));
    SetPlayerPos(playerid, RandomSpawnTeam1[Random][0], RandomSpawnTeam1[Random][1], RandomSpawnTeam1[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawnTeam1[Random][3]);
    }

    else if(gTeam[playerid] == POLICE) {
    new
   	Random = random(sizeof(RandomSpawnTeam2));
    SetPlayerPos(playerid, RandomSpawnTeam2[Random][0], RandomSpawnTeam1[Random][1], RandomSpawnTeam2[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawnTeam2[Random][3]);
	}
 	else if(gTeam[playerid] == DRIFTERS) {
    new
   	Random = random(sizeof(RandomSpawnTeam3));
    SetPlayerPos(playerid, RandomSpawnTeam3[Random][0], RandomSpawnTeam3[Random][1], RandomSpawnTeam3[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawnTeam3[Random][3]);
	}
	else if(gTeam[playerid] == MAFIA) {
    new
   	Random = random(sizeof(RandomSpawnTeam4));
    SetPlayerPos(playerid, RandomSpawnTeam4[Random][0], RandomSpawnTeam4[Random][1], RandomSpawnTeam4[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawnTeam4[Random][3]);
	}
	else if(gTeam[playerid] == BIKERS) {
    new
   	Random = random(sizeof(RandomSpawnTeam5));
    SetPlayerPos(playerid, RandomSpawnTeam5[Random][0], RandomSpawnTeam5[Random][1], RandomSpawnTeam5[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawnTeam5[Random][3]);
	}
	else if(gTeam[playerid] == STUNTERS) {
    new
   	Random = random(sizeof(RandomSpawnTeam6));
    SetPlayerPos(playerid, RandomSpawnTeam6[Random][0], RandomSpawnTeam6[Random][1], RandomSpawnTeam6[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawnTeam6[Random][3]);
	}
  	SetPlayerInterior(playerid, 0);
  	SetPlayerToTeamColour(playerid);
	return 1;
}
but it isnt working.. how to fix it?
Reply


Messages In This Thread
need help with randomspawn - by niels44 - 30.11.2011, 16:17
Re: need help with randomspawn - by Kostas' - 30.11.2011, 16:26
Re: need help with randomspawn - by niels44 - 01.12.2011, 12:43
Re: need help with randomspawn - by Kostas' - 01.12.2011, 12:51
Re: need help with randomspawn - by niels44 - 01.12.2011, 13:21
Re: need help with randomspawn - by niels44 - 01.12.2011, 14:19
Re: need help with randomspawn - by Kostas' - 01.12.2011, 14:20
Re: need help with randomspawn - by niels44 - 01.12.2011, 17:13
Re: need help with randomspawn - by niels44 - 01.12.2011, 17:30
Re: need help with randomspawn - by niels44 - 01.12.2011, 17:54

Forum Jump:


Users browsing this thread: 2 Guest(s)