Liberty Unleashed

Scripting => Script Help => Topic started by: mimomohamed on August 17, 2012, 02:43:58 pm

Title: Sending Players In Random Places
Post by: mimomohamed on August 17, 2012, 02:43:58 pm
How To Send Players In Random That In Same Area
Title: Re: Sending Players In Random Places
Post by: Rocky on August 17, 2012, 04:54:22 pm
Set your corrdinates
Code: [Select]
position <- Vector(coordinatex, coordinatey,coordinatez ); //here
local RandomLoc = RandNum( 5,10 );
player.Pos = Vector(position.x+ RandNum(1,5), position.y+RandomLoc, position.z);
Code: [Select]

Don't touch the below function
function RandNum(start, finish)
{
local t;
if (start < 0) t = ((rand() % (-start + finish)) + start)
else
{
t = ((rand() % (finish - start)) + start);
}
return t;
}
Title: Re: Sending Players In Random Places
Post by: mimomohamed on August 17, 2012, 08:22:49 pm
 :o :o :o :o :o :o Really Really Really man i don't know what can i say for u thanks thanks thanks very much man i was searching for it in about 5 hours  :o thanks  8) ;D ;)
Title: Re: Sending Players In Random Places
Post by: mimomohamed on August 17, 2012, 08:47:31 pm
but it makes me telport to 2 or 3 places only however that i changed the start and the finish
Title: Re: Sending Players In Random Places
Post by: Rocky on August 18, 2012, 06:53:58 am
Edit your coordinates, thats all.
position <- Vector( x, y, z );
Title: Re: Sending Players In Random Places
Post by: mimomohamed on August 18, 2012, 11:52:47 am
Ya sure i made that When u gave me it .
And Thanks i was wrong it's not 1 or 2 or 3 it's 4 places :) :P