07.02.2012, 14:13
Try this one bro
pawn Код:
public SetPlayerRandomSpawn(playerid)
{
if (iSpawnSet[playerid] == 1)
{
new rand = random(sizeof(gCopPlayerSpawns));
SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1],gCopPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, gIndiaSP[rand][3]);
}
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;
}