Objects on random position.
#6

new rand[4];
rand[0] = random(3000);
rand[1] = random(3000);
rand[2] = random(300);
( rand[3] add random(2) if it's 1 => multiply rand[0] by 1 , if 0 multiply it by -1 )
SetObjectPos(theobject you created, rand[0], rand[1], rand[2]);
Send message to admins : format(string, 128, " Item spawned in %f, %f, %f coords.", rand[0], rand[1], rand[2]);
Good luck finding it, that's what you asked for ( random ) because you said you don't wanna make array that contains different ( real random position ) because random can spawn the object in the air, in buildings, in mountains ..

MapAndreas uses a lot of RAM, it's efficient, accurate, but too heavy.
Reply


Messages In This Thread
Objects on random position. - by HY - 03.03.2015, 17:39
Re: Objects on random position. - by awoo - 03.03.2015, 17:43
Re: Objects on random position. - by Mystique - 03.03.2015, 17:45
Re: Objects on random position. - by HY - 03.03.2015, 17:52
Re: Objects on random position. - by Evocator - 03.03.2015, 18:20
Re : Objects on random position. - by Golimad - 03.03.2015, 18:24
Re: Re : Objects on random position. - by HY - 03.03.2015, 18:29

Forum Jump:


Users browsing this thread: 1 Guest(s)