[Help]How to Random Spawn?
#1

Guys! I really need help with this!
Код:
SetPlayerPos(playerid, 2493.9133, -1682.3986, 13.3382);
 	SetPlayerInterior(playerid, 0); //grove st. spawn
 	
 	SetPlayerPos(playerid, -2617.5156, 1390.6353, 7.1105);
 	SetPlayerInterior(playerid, 0);//jizzy spawn
 	
 	SetPlayerPos(playerid, 2028.5538, 1008.3543, 10.8203);
  SetPlayerInterior(playerid, 0);//4 dragons casino spawn
  
  SetPlayerPos(playerid, 1541.2833, -1362.4741, 329.6457);
  	SetPlayerInterior(playerid, 0);//starfish tower
How can i make random spawns?? Plz tell me!!! This wont work!
Reply
#2

With this
Reply
#3

Quote:
Originally Posted by dice7
With this
I tried searching, no real help : (

Reply
#4

You should read some gamemode scripts including with your server package. As an example lvdm has a random spawn, maybe you use it?
Reply
#5

I have done that... But since im a newbie, i dont understand them... If I tru to copy it into my script, it gives me tonnes of errors!
Reply
#6

Please can someone give me an example of random spawning?
Reply
#7

pawn Код:
public OnPlayerSpawn(playerid)
{
  if(Is player in dm or simething)
  {
    new rand = random(3);
    switch(rand)
    {
      case 0:
      {
        SetPlayerPos();
        SetPlayerFacingAngle();
      }

      case 1:
      {
        SetPlayerPos();
        SetPlayerFacingAngle();
      }

      case 2:
      {
        SetPlayerPos();
        SetPlayerFacingAngle();
      }
    }
  }
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)