Random pickups doubt
#2

Most of those scripts aren't really 100% random. Of course you could create true randomness, fetch Z position using MapAndreas, but you'd have to refine it. Usually it's done like:
1. Create an array of viable positions
pawn Код:
static stock const Float:Positions[3193219837132][3] = {
{ X, Y, Z },
{ X, Y, Z },
//ad nauseam
}
2. Generate random number between 0 and sizeof Positions - 1
3. Use that as an index
Reply


Messages In This Thread
Random pickups doubt - by aalbero99 - 07.07.2015, 11:04
Re: Random pickups doubt - by Misiur - 07.07.2015, 11:56

Forum Jump:


Users browsing this thread: 1 Guest(s)