17.03.2012, 11:15
pawn Код:
enum posInfo
{
Float: X,
Float: Y,
Float: Z,
}
new JailZones[][posInfo] = {
{X, Y, Z}, // change X, Y, Z to the cordinates of jail 1
{X, Y, Z}, // change X, Y, Z to the cordinates of jail 2
{X, Y, Z}, // change X, Y, Z to the cordinates of jail 3
{X, Y, Z}, // change X, Y, Z to the cordinates of jail 4
{X, Y, Z}, // change X, Y, Z to the cordinates of jail 5
{X, Y, Z}, // change X, Y, Z to the cordinates of jail 6
{X, Y, Z} // change X, Y, Z to the cordinates of jail 7
};
// Now to choose a random cordinate just do:
new RandomJail = random(sizeof(JailZones));
// Then :
SetPlayerPos(playerid, JailZones[RandomJail][X], JailZones[RandomJail][Y], JailZones[RandomJail][Z]);