Random not working properly
#1

Good evening!

I have 5 beds that player spawn in when he dies ,but when i die and for instance my friends we all spawn in same bed..How to make it random for everyone?Bed variables like occupied? D

pawn Код:
new Float:LigoninesLovos[][] =
{
    {-197.1666,-1759.9664,676.4661,272.1911},
    {-200.7865,-1763.9344,676.4661,271.3739},
    {-196.8234,-1771.7848,676.4661,357.3743},
    {-197.1552,-1767.9449,676.4661,4.5810},
    {-197.2890,-1763.8800,676.4661,357.3743}
};

new Random = random(sizeof(LigoninesLovos));
        SetPlayerPos(playerid, LigoninesLovos[Random][0], LigoninesLovos[Random][1], LigoninesLovos[Random][2]);
        SetPlayerFacingAngle(playerid, LigoninesLovos[Random][3]);
Reply


Messages In This Thread
Random not working properly - by Dziugsas - 23.06.2014, 21:22
Re: Random not working properly - by GeekSiMo - 23.06.2014, 21:27
Re: Random not working properly - by Dziugsas - 23.06.2014, 21:28
Re: Random not working properly - by Konstantinos - 23.06.2014, 21:50
Re: Random not working properly - by Dziugsas - 23.06.2014, 22:07
Re: Random not working properly - by Dziugsas - 23.06.2014, 22:10

Forum Jump:


Users browsing this thread: 1 Guest(s)