Random Pickups Spawns
#2

the
Код:
new Float:RandomSpawns[0][3] =
looks weird. a [0] in the array size with 3 cells each?
try to remove the 0 and make it simply [], so the compiler will estimate the size when compiling, also the sizeof(RandomSpawns) will return its real size. so the random() will pick another number than 0:
Код:
new Float:RandomSpawns[][3] =
oh, a little debug will help you to find the pickup position the script decided for you:
Код:
new rand = random(sizeof(RandomSpawns));
drugs = CreatePickup(1279, 1, RandomSpawns[rand][0], RandomSpawns[rand][1], RandomSpawns[rand][2], 0);

new string[128];
format(string,sizeof(string),"pickup %d spawned. position (x,y,z): %4.2f %4.2f %4.2f",rand,RandomSpawns[rand][0], RandomSpawns[rand][1], RandomSpawns[rand][2]);
SendClientMessageToAll(0xcc3333ff,string);
Reply


Messages In This Thread
Random Pickups Spawns - by Steeve_Smith - 10.07.2011, 00:56
Re: Random Pickups Spawns - by Babul - 10.07.2011, 10:19
Re : Random Pickups Spawns - by Steeve_Smith - 10.07.2011, 10:55

Forum Jump:


Users browsing this thread: 3 Guest(s)