All pastes #784135 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-11-19 15:49 UTC
rendered paste body
new iSpawnSet[MAX_PLAYERS];

new Float:gRandomPlayerSpawns[change this to the amount of spawns you have][3] = {
{1958.3783,1343.1572,15.3746},
{2199.6531,1393.3678,10.8203},
{2199.6531,1393.3678,10.8203} // this last one must not have a comma
};

SetPlayerRandomSpawn(playerid);


public SetPlayerRandomSpawn(playerid)
{
	else if (iSpawnSet[playerid] == 0)
    {
		new rand = random(sizeof(gRandomPlayerSpawns));
		SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
	}
	return 1;
}


iSpawnSet[playerid] = 0;