random spawn points
#10

Quote:
Originally Posted by SilverKiller
Посмотреть сообщение
pawn Код:
public OnPlayerSpawn(playerid)
{
    new Random = random(sizeof(RandomSpawns));
    SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
    return 1;
}
That will work but, you should be using SetSpawnInfo() furthermore the random spawn variable is ugly and should be an enum for readability.
Reply


Messages In This Thread
random spawn points - by semaj - 16.05.2013, 11:56
Re: random spawn points - by SilverKiller - 16.05.2013, 12:01
Re: random spawn points - by semaj - 16.05.2013, 12:03
Re: random spawn points - by SilverKiller - 16.05.2013, 12:06
Re: random spawn points - by semaj - 16.05.2013, 12:11
Re: random spawn points - by SilverKiller - 16.05.2013, 12:18
Re: random spawn points - by semaj - 16.05.2013, 12:23
Re: random spawn points - by SilverKiller - 16.05.2013, 12:26
Re: random spawn points - by semaj - 16.05.2013, 12:29
Re: random spawn points - by Pottus - 16.05.2013, 12:45

Forum Jump:


Users browsing this thread: 4 Guest(s)