03.08.2011, 23:16
Replace this function with the code I've changed for you:
Variable/array names are extremely sensitive, you seem to have mistyped the array names for the spawns, be a little more vigilant next time.
pawn Код:
public SetPlayerRandomSpawn(playerid)
{
if (iSpawnSet[playerid] == 1)
{
new rand = random(sizeof(gGrovePlayerSpawns));
SetPlayerPos(playerid, gGrovePlayerSpawns[rand][0], gGrovePlayerSpawns[rand][1], gGrovePlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
}
else if (iSpawnSet[playerid] == 0)
{
new rand = random(sizeof(gAztecaPlayerSpawns));
SetPlayerPos(playerid, gAztecaPlayerSpawns[rand][0], gAztecaPlayerSpawns[rand][1], gAztecaPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
}
else if (iSpawnSet[playerid] == 2)
{
new rand = random(sizeof(gVagosPlayerSpawns));
SetPlayerPos(playerid, gVagosPlayerSpawns[rand][0], gVagosPlayerSpawns[rand][1], gVagosPlayerSpawns[rand][2]);
SetPlayerFacingAngle(playerid, 270.0);
}
else if (iSpawnSet[playerid] == 3)
{
new rand = random(sizeof(gCopPlayerSpawns));
SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]);
}
return 1;
}