Author Topic: Sending Players In Random Places  (Read 1542 times)

mimomohamed

  • Full Member
  • ***
  • Posts: 126
  • Karma: +5/-1
    • View Profile
    • http://www.egyptforall.smffy.com
Sending Players In Random Places
« on: August 17, 2012, 03:43:58 pm »
How To Send Players In Random That In Same Area

Rocky

  • Full Member
  • ***
  • Posts: 105
  • Karma: +5/-3
    • View Profile
Re: Sending Players In Random Places
« Reply #1 on: August 17, 2012, 05: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;
}
« Last Edit: August 18, 2012, 07:43:34 am by Rocky »
Look for lu server testers, Requirements are:
English good enough to communicate.
Good knowledge about gaming.

PM me those who are interested.

mimomohamed

  • Full Member
  • ***
  • Posts: 126
  • Karma: +5/-1
    • View Profile
    • http://www.egyptforall.smffy.com
Re: Sending Players In Random Places
« Reply #2 on: August 17, 2012, 09: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 ;)

mimomohamed

  • Full Member
  • ***
  • Posts: 126
  • Karma: +5/-1
    • View Profile
    • http://www.egyptforall.smffy.com
Re: Sending Players In Random Places
« Reply #3 on: August 17, 2012, 09:47:31 pm »
but it makes me telport to 2 or 3 places only however that i changed the start and the finish

Rocky

  • Full Member
  • ***
  • Posts: 105
  • Karma: +5/-3
    • View Profile
Re: Sending Players In Random Places
« Reply #4 on: August 18, 2012, 07:53:58 am »
Edit your coordinates, thats all.
position <- Vector( x, y, z );
Look for lu server testers, Requirements are:
English good enough to communicate.
Good knowledge about gaming.

PM me those who are interested.

mimomohamed

  • Full Member
  • ***
  • Posts: 126
  • Karma: +5/-1
    • View Profile
    • http://www.egyptforall.smffy.com
Re: Sending Players In Random Places
« Reply #5 on: August 18, 2012, 12:52:47 pm »
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

 

© Liberty Unleashed Team.