• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Distance(self.origin, location) not working?
#1
I have this code inside a while(1) which is active all the time while the player is spawned, but it ALWAYS returns true, no matter where you are in the map.

Code:
        if(Distance(self.origin, level.intel[level.currentintel].coordinates) <= 70) self.nearintel = true;
        else self.nearintel = false;

have I done anything wrong? yes, level.currentintel and level.intel[ID].coordinates are defined, forced before anything else is. i have set self.nearintel = false; when the player connects.

thanks in advance
  Reply
#2
hmm, weird. Give us the rest of the function please.
[Image: MaEIQ.png]
  Reply
#3
Code:
if(Distance(self.origin, level.intel[level.currentintel].coordinates) <= 70)

to:

Code:
if(Distance(self.origin, level.intel[level.currentintel].coordinates.origin) <= 70)

It needs origin, no? Smile
  Reply
#4
(01-05-2012, 12:06)Yamato Wrote:
Code:
if(Distance(self.origin, level.intel[level.currentintel].coordinates) <= 70)

to:

Code:
if(Distance(self.origin, level.intel[level.currentintel].coordinates.origin) <= 70)

It needs origin, no? Smile

thanks, but it works now. the coordinates weren't even initialized and thats why it was bugging up. I ended up fixing it myself, but thanks anyway Smile
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Plugins are not working clemi555 7 4,358 11-03-2013, 10:55
Last Post: d0h!
  [Release] Working Aimbot The Clay Man 17 19,289 10-21-2013, 15:10
Last Post: zurasaur
  How to get models working? Erik The Born 2 2,827 04-28-2013, 08:19
Last Post: Erik The Born
  [d3d9.dll] MW3 Server Has Stopped Working.. bertancakici 4 6,156 11-16-2012, 01:09
Last Post: JariZ
Sad Help KillifBelow Not Working DidUknowiPwn 4 2,875 10-29-2012, 10:22
Last Post: RaZ
  [Request] ServerClient.Origin archit 4 3,114 09-19-2012, 01:35
Last Post: DidUknowiPwn
  the big show-what-you're-working-on thread JariZ 183 68,340 09-07-2012, 21:32
Last Post: Nekochan
  Help Teleporting via Flags/Origin/Location yokai134 2 2,764 09-06-2012, 12:19
Last Post: yokai134
  server stop working s.j-rez 9 4,702 08-26-2012, 06:23
Last Post: s.j-rez
  stop working eror{please help me:((} s.j-rez 0 1,765 08-25-2012, 12:47
Last Post: s.j-rez

Forum Jump:


Users browsing this thread: 1 Guest(s)