how to make a random spawn?
#2

Код:
//on the top 
new Float:Rs[][4] = 
{
    {2614.5420,-2468.1777,3.0000, 192.0335},
    {2644.9099,-2022.1721,13.5469, 267.2932},
    {-2706.4773,218.7441,4.1797, 89.8853}
    //replace/and add more spawns here
};

//on player spawn 
public OnPlayerSpawn(playerid)
{
  new rand = random(sizeof(Rs));
  SetPlayerPos(playerid,Rs[rand][0], Rs[rand][1],Rs[rand][2]);
  SetPlayerFacingAngle(playerid,Rs[rand][3]);
  return 1;
}
Reply


Messages In This Thread
how to make a random spawn? - by niels44 - 01.11.2011, 16:24
Re: how to make a random spawn? - by HuSs3n - 01.11.2011, 16:28
Re: how to make a random spawn? - by niels44 - 01.11.2011, 16:34
Re: how to make a random spawn? - by Edvin - 01.11.2011, 17:46

Forum Jump:


Users browsing this thread: 1 Guest(s)