Random spawn in area
#2

Save 12 (or more) coordinates then use random()
https://sampwiki.blast.hk/wiki/Random
pawn Код:
new c = random(12)+1; //creates a random number from 0 to 12
        switch (c)
        {
        case 0:{SetPlayerPos(playerid,286.9416,1410.9337,10.3947);}
        case 1:{SetPlayerPos(playerid,286.9416,1410.9337,10.3947);}
        case 2:{SetPlayerPos(playerid,215.0739,1411.1678,10.5859);}
        case 3:{SetPlayerPos(playerid,111.3430,1410.3840,10.6022);}
        case 4:{SetPlayerPos(playerid,189.9601,1483.5343,10.5859);}
        case 5:{SetPlayerPos(playerid,205.5110,1347.1440,10.5859);}
        case 6:{SetPlayerPos(playerid, 215.0226,1466.8556,23.7344);}
        case 7:{SetPlayerPos(playerid,246.6161,1361.7271,23.3703);}
        case 8:{SetPlayerPos(playerid, 246.3493,1435.4602,23.3750);}
        case 9:{SetPlayerPos(playerid, 215.0226,1466.8556,23.7344);}
        case 10:{SetPlayerPos(playerid, 187.6121,1371.7318,23.7344);}
        case 11:{SetPlayerPos(playerid, 187.6121,1371.7318,23.7344);}
        case 12:{SetPlayerPos(playerid, 246.6161,1361.7271,23.3703);}
        }
Reply


Messages In This Thread
Random spawn in area - by Dreftas - 15.06.2009, 13:04
Re: Random spawn in area - by dice7 - 15.06.2009, 13:54
Re: Random spawn in area - by Dreftas - 15.06.2009, 14:43
Re: Random spawn in area - by yezizhu - 15.06.2009, 14:49
Re: Random spawn in area - by Dreftas - 15.06.2009, 14:56
Re: Random spawn in area - by yezizhu - 15.06.2009, 14:56

Forum Jump:


Users browsing this thread: 1 Guest(s)