Quote:
Originally Posted by ZeeX
Quote:
Originally Posted by clavador
I've found a working way, but every car is the same:
|
You need to get random number for every vehicle, not only once:
pawn Код:
new size = sizeof(Normal_Cars);
AddStaticVehicle(Normal_Cars[random(size)], .....); AddStaticVehicle(Normal_Cars[random(size)], .....); AddStaticVehicle(Normal_Cars[random(size)], .....); AddStaticVehicle(Normal_Cars[random(size)], .....); ......
Quote:
Originally Posted by clavador
I still don't know why it fails to compile when I use the Randoms Outside the Callbacks.
|
Quote:
Originally Posted by pawn-lang.pdf
A global declaration appears outside a function and a global variable
is accessible to any function. Global data objects can only be
initialized with constant expressions.
|
==> you cannot initialize global variables using any functions or other variables.
|
Thanks!!!!
I forgot that the variables should be a fixed value when initialized as global.