Author Topic: ulx timeout  (Read 8063 times)

0 Members and 2 Guests are viewing this topic.

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
ulx timeout
« on: May 06, 2015, 03:02:06 PM »
ULX TIMEOUT

This is a simple addon to ULX that will teleport a naughty player to a set location (should be a corner) and freezes them there so they get to think about what they have done!

Commands:

!timeout <player> <seconds for timeout>

Soon to add:

HUD saying "YOU ARE IN TIMEOUT"
!settimeoutspot command
!untimeout command

NEW VIDEO
« Last Edit: May 06, 2015, 04:29:31 PM by XxLMM13xX »

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: ulx timeout
« Reply #1 on: May 06, 2015, 03:13:10 PM »
Some criticism for ya

1.  the function ulx.freeze I do not believe you need?

2.  You better check to make sure the player hasn't disconnected.  (ply and ply:IsValid() in timer)

3.  Possibly make the position save?  Might just make the addon overly complicated.

4.  A max timeout of 100 seconds is kind of small, increase it or have no limit?

5.  Is calling ulx unfreeze necessary?

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
Re: ulx timeout
« Reply #2 on: May 06, 2015, 03:58:08 PM »
Some criticism for ya

1.  the function ulx.freeze I do not believe you need?

2.  You better check to make sure the player hasn't disconnected.  (ply and ply:IsValid() in timer)

3.  Possibly make the position save?  Might just make the addon overly complicated.

4.  A max timeout of 100 seconds is kind of small, increase it or have no limit?

5.  Is calling ulx unfreeze necessary?

1. Looking back... no i will fix this

2. Good point

3. What do you mean?

4. Did not look at that! Will fix

5. Because of #1.... Yes

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: ulx timeout
« Reply #3 on: May 06, 2015, 04:31:03 PM »
3. What do you mean?
I just meant a way to save position over map changes and such.  It just seems like setting it every time would be annoying.

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
Re: ulx timeout
« Reply #4 on: May 06, 2015, 04:32:37 PM »
UPDATE:

Added a !untimeout
Took out the unfreeze command thingy
took out the freeze command

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
Re: ulx timeout
« Reply #5 on: May 06, 2015, 04:35:27 PM »
I just meant a way to save position over map changes and such.  It just seems like setting it every time would be annoying.

so like a !settimeoutlocation command (not that long)

Ill look into it if so

Offline BobTheDuck

  • Newbie
  • *
  • Posts: 5
  • Karma: -2
Re: ulx timeout
« Reply #6 on: February 18, 2016, 04:43:01 PM »
This is revolutionary! xD

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
Re: ulx timeout
« Reply #7 on: February 20, 2016, 01:55:18 PM »
<3