ULX

Author Topic: Force respawn and bring command?  (Read 644 times)

0 Members and 1 Guest are viewing this topic.

Offline Taylorr<3/only.fans

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Force respawn and bring command?
« on: June 30, 2020, 11:53:20 PM »
(Ignore my name it was a joke) So I am pretty new to this coding stuff. I found a lot of custom commands for force respawning a player but can someone please make a ulx command that spawns a player if they are dead and brings them? If a player isn't alive, you can bring them and I don't want players to have to run 2 commands to get a dead player tped to them. I'm looking for a command like !fbring to forcefully bring a player if they are dead. I don't want it to freeze them, just spawn them and bring them. (!fbring player)

Thanks
« Last Edit: July 01, 2020, 12:29:37 AM by Taylorr<3/only.fans »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8082
  • Karma: 389
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Force respawn and bring command?
« Reply #1 on: July 01, 2020, 03:27:35 PM »
We're usually not a request forum, at least, most of us.
Most of the folks here would rather help you with what code you've tried, and assist in understanding errors you get when you try your own code.
All the code examples you'd need are actually within the two functions you're trying not to have to use; the best way for you to learn would be to try to figure out how to combine them into one command.

What have you tried?
Have you even tried making your own ulx lua module file?

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

Offline Taylorr<3/only.fans

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Force respawn and bring command?
« Reply #2 on: July 04, 2020, 09:23:04 AM »
I have tried and I just don't know enough about Glua and it didn't go good.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 796
  • Karma: 57
Re: Force respawn and bring command?
« Reply #3 on: July 23, 2020, 01:17:37 AM »
A respawn command: https://github.com/cobalt77/Custom-ULX-Commands/blob/master/CustomCommands/lua/ulx/modules/sh/cc_util.lua#L602
A bring command: https://github.com/TeamUlysses/ulx/blob/master/lua/ulx/modules/sh/teleport.lua#L75

Can take the functionality of these and combine them into a new function, and make a command from that.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube