Ulysses
General => Developers Corner => Topic started by: xxnukzxx on July 09, 2016, 05:59:36 PM
-
Hello, i'm brand new to lua, and i'm trying to make a DarkRP command:
o ulx shipment <ent> <amount>
i would like to make this command because i cannot find it anywhere! If someone
could teach me how to make a command like this it would be much obliged.
Where would i use the code:
DarkRP.createShipment(string name, table tbl)
-
First of all, not many people here will just write code for you, unless it's something extremely simple. As I, myself, don't know much about DarkRP, I can't really help you here. I'd recommend learning Lua (https://www.youtube.com/channel/UCFpuE-Qjn4EWqX-VJ_l7pbw) first, as it only takes a few hours and is very useful if you're going to continue doing this.
If you want to make a command for ULX for DarkRP, you need to check out the DarkRP functions. I found one that could pertain to what you're trying to do here. (http://wiki.darkrp.com/index.php/Functions/DarkRP/Shared/createShipment)
-
First of all, not many people here will just write code for you, unless it's something extremely simple.
He didn't ask for anyone to code it for him:
If someone could teach me how to make a command like this it would be much obliged.
xxnukxx, I suggest you take a look at the code for the default ULX commands. You can find the code for commands in garrysmod/addons/ulx/lua/ulx/modules/sh/, or you can view the code online (https://github.com/TeamUlysses/ulx/tree/master/lua/ulx/modules/sh). You should be able to modify a command to suit your needs.
-
There are also a few how to make a command threads around here.
Using the forum search should find something.
-
He didn't ask for anyone to code it for him:
xxnukxx, I suggest you take a look at the code for the default ULX commands. You can find the code for commands in garrysmod/addons/ulx/lua/ulx/modules/sh/, or you can view the code online (https://github.com/TeamUlysses/ulx/tree/master/lua/ulx/modules/sh). You should be able to modify a command to suit your needs.
I was just pointing that out just in case because many people just ask for this written. I didn't want it to come to that so I just said it.