All pastes #829625 Raw Edit

Unnamed

public text v1 · immutable
#829625 ·published 2007-12-23 09:40 UTC
rendered paste body
// Lines below are fine, they don't give a warning...

new Float:gRandomPlayerSpawns[20][3] = {
	{-1954.8739,1339.8470,7.1875},
	{-2615.5615,1399.8191,7.0938},
	{-2524.5872,1225.7512,37.4283},
	{-2641.6741,933.4413,71.9531},
	{-2461.3098,780.9857,35.1719},
	{-2649.6931,631.9176,14.4545},
	{-2977.9775,473.4328,4.9141},
	{-2707.0366,369.1923,4.3874},
	{-2646.8306,212.0548,4.3281},
	{-2623.1458,-4.4089,6.1328},
	{-2657.8313,-284.1741,7.5391},
	{-2368.5046,-206.4576,42.6761},
	{-2368.5046,-206.4576,42.6761},
	{-2022.4388,143.8737,28.8359},
	{-1974.3752,120.5053,27.6875},
	{-2082.6189,287.3107,35.5848},
	{-1803.2118,583.7510,35.1641},
	{-1620.8081,678.7302,7.1875},
	{-1704.3478,1037.5590,45.2109},
	{-1664.1724,1208.6082,21.1563}
};
new Float:gRandomWeapons[9][2] = {
	{31,175},
	{30,175},
	{26,50},
	{32,600},
	{27,80},
	{28,420},
	{29,290},
	{25,400},
	{23,60}
};

// The problem comes when I add those lines:

public SetPlayerRandomSpawn(playerid)
{
	if (iSpawnSet[playerid] == 0)
    {
		new randspawn = random(sizeof(gRandomPlayerSpawns));
		new randweap = random(sizeof(gRandomWeapons));
		SetPlayerPos(playerid, gRandomPlayerSpawns[randspawn][0], gRandomPlayerSpawns[randspawn][1], gRandomPlayerSpawns[randspawn][2]);
		GivePlayerWeapon(playerid, gRandomWeapons[randweap][0], gRandomWeapons[randweap][1]);
	}
	return 1;
}

// Ahh, what is it? The problem comes to ALL lines when I add the ones on SetPlayerRandomSpawn... :S