Ulysses

General => Developers Corner => Topic started by: Taylorr<3/only.fans on June 30, 2020, 11:53:20 PM

Title: Force respawn and bring command?
Post by: Taylorr<3/only.fans 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
Title: Re: Force respawn and bring command?
Post by: JamminR 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?

Title: Re: Force respawn and bring command?
Post by: Taylorr<3/only.fans 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.
Title: Re: Force respawn and bring command?
Post by: iViscosity 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.