Spawn randomly
#1

Okay, so lets say that when the player types /grove
Код:
  if (!strcmp("/grove",cmdtext,true))
	{
     SetPlayerPos(playerid, 2498, -1666, 14);
	return 1;
	}
He will teleport to the that postion.

Problem:
How can I make the player spawn randomly around the grove street?

________
Stocks to buy now
Reply
#2

Get more cords and do something like that

pawn Код:
if (!strcmp("/grove",cmdtext,true))
    {
        switch(random(4)) //4 is the number of positions
        {
            case 0: SetPlayerPos(playerid, 2498, -1666, 14);
            case 1: SetPlayerPos(playerid, 2498, -1666, 14);
            case 2: SetPlayerPos(playerid, 2498, -1666, 14);
            case 3: SetPlayerPos(playerid, 2498, -1666, 14);
        }
       
        return 1;
    }
Reply
#3

Quote:
Originally Posted by ? Joker ?
Get more cords and do something like that

pawn Код:
if (!strcmp("/grove",cmdtext,true))
    {
        switch(random(4)) //4 is the number of positions
        {
            case 0: SetPlayerPos(playerid, 2498, -1666, 14);
            case 1: SetPlayerPos(playerid, 2498, -1666, 14);
            case 2: SetPlayerPos(playerid, 2498, -1666, 14);
            case 3: SetPlayerPos(playerid, 2498, -1666, 14);
        }


       
        return 1;
    }
Okay, thank you very much
________
BUY EXTREME VAPORIZER
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)