ULX

Author Topic: [Prop Hunt] Prevent player going to xx xx coordinates  (Read 2756 times)

0 Members and 4 Guests are viewing this topic.

Offline BelgiumWarGod

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
[Prop Hunt] Prevent player going to xx xx coordinates
« on: December 07, 2014, 07:22:40 PM »
Hi,
How do i get the current coordinates of a player in ulx ?

I want to make a addon that prevent you from going to a specific coordinate(s).
So i need to know how you get the coordinate(s) of a player ?

Example : Prop wants to go behind dumpster but gets pushed back for going to that coordinate.

Excusses of this is very simple but i just started messing around in ulx so thanks for helping

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: [Prop Hunt] Prevent player going to xx xx coordinates
« Reply #1 on: December 07, 2014, 07:47:20 PM »
ULX admin mod has no function like you're asking about.
Perhaps you could go ask for help coding a function (whether ULib dependent or not) in the Developers corner.

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline BelgiumWarGod

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: [Prop Hunt] Prevent player going to xx xx coordinates
« Reply #2 on: December 07, 2014, 08:22:32 PM »
ULX admin mod has no function like you're asking about.
Perhaps you could go ask for help coding a function (whether ULib dependent or not) in the Developers corner.

Oh k thanks for the fast reply. I'll guess i look in to map editing our something like that.

lol if someone could make this and ask 20 $ for it he/she is going to get nice money of it xD pretty much every server would buy it

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: [Prop Hunt] Prevent player going to xx xx coordinates
« Reply #3 on: December 07, 2014, 09:15:26 PM »
I've seen mentions of spawn protect scripts here, wouldn't surprise me if the framework hasn't been done already somewhere.
Though you're not necessarily trying to protect spawn, the idea is generally the same.

As for charging, well, we don't exactly recommend that here, since the license ULib/ULX use (Creative Commons 3) expressly forbids charging.
Not exactly strongly enforced though.
Most coders here code Lua for fun.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline BelgiumWarGod

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: [Prop Hunt] Prevent player going to xx xx coordinates
« Reply #4 on: December 08, 2014, 06:17:06 AM »
I've seen mentions of spawn protect scripts here, wouldn't surprise me if the framework hasn't been done already somewhere.
Though you're not necessarily trying to protect spawn, the idea is generally the same.

Hmm i could take a look in those scripts. I've checking out the !unstuck scripts already cause those teleport you back to the map.

As for charging, well, we don't exactly recommend that here, since the license ULib/ULX use (Creative Commons 3) expressly forbids charging.
Not exactly strongly enforced though.
Most coders here code Lua for fun.

Well if i ever could find / make something in ulx that does this i'll never ask money for it.
I mess around in programming languages for fun.
Ulx is a great language it reminds me of a simplified c# language and C# is awesome if you get the hang of it x.x

Offline Avoid

  • Full Member
  • ***
  • Posts: 142
  • Karma: 42
Re: [Prop Hunt] Prevent player going to xx xx coordinates
« Reply #5 on: December 08, 2014, 09:43:18 AM »
Hi,
How do i get the current coordinates of a player in ulx ?

I want to make a addon that prevent you from going to a specific coordinate(s).
So i need to know how you get the coordinate(s) of a player ?

Example : Prop wants to go behind dumpster but gets pushed back for going to that coordinate.

Excusses of this is very simple but i just started messing around in ulx so thanks for helping

Hello there,
I can think of two methods:
  • Make a SENT and check if the ply is touching it via ENT:Touch, then teleport/push out the player.
  • Use FindInBox in a think hook
I personally would go with the first method of doing so, as I do not like putting unnecessary things inside the Think hook, hopefully I was able to guide you in the right direction.

Avoid
« Last Edit: December 08, 2014, 09:52:40 AM by Avoid »