Still confused
#1

I'm still confused on how to make a certain skin,
not just spawn at a one place, but spawn randomly
anywhere I set the coords to. But how?
Reply
#2

You can use random() function.

For example:

Код:
new RandomSpawns[][]=
{ SetPlayerPos(playerid,x,y,z.....);//first spawn place
  SetPlayerPos(playerid,x,y,z.....);//second spawn place
  .
  .
  .
  .
 }
Then OnPlayerSpawn or aywhere you want,
Код:
random("RandomSpawns");
There maybe some errors above
You get the idea though don't you
Reply
#3

Quote:
Originally Posted by DJDhan
You can use random() function.

For example:

Код:
new RandomSpawns[][]=
{ SetPlayerPos(playerid,x,y,z.....);//first spawn place
  SetPlayerPos(playerid,x,y,z.....);//second spawn place
  .
  .
  .
  .
 }
Then OnPlayerSpawn or aywhere you want,
Код:
random("RandomSpawns");
There maybe some errors above
You get the idea though don't you
I already know that, but how can I make it
for a certain skin only?
Reply
#4

Quote:
Originally Posted by [ĦŁ₣
ЉǾǖŦĦЗŁΛẄ ]
make the array with the coords in:

new Array[3][3]=
{
{x, y, z},
{x, y, z},
{x, y, z}
}

when they spawn:

new playerskin=GetPlayerSkin(playerid);
if(playerskin == skin to randomly spawn)
{
new r=random(3);
SetPlayerPos(playerid, Array[r][0], Array[r][1], Array[r][2]);
}

hope that helped
Thanks for this But theres a problem :
It only spawns me at a one place, not randomly
anywhere.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)