10.07.2011, 10:19
the
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:
oh, a little debug will help you to find the pickup position the script decided for you:
Код:
new Float:RandomSpawns[0][3] =
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] =
Код:
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);