This is what I have, it should give enough information or example of what I want. I just do not know how to make it work. I currently get an error with line 7 saying "addons/ulx/lua/ulx/modules/sh/refund.lua:5: attempt to compare nil with number" (says line 5 because i added the if statement above it after I got the error).

Few things to research:--Is this a server side only command? Or a client side only command?Though it can still live in /sh (shared), if it's either one or the other, you'd need to specify a comparison to ensure it's only being run where it's supposed to (server or client).--Do you have any command anywhere else that is trying to run this command as the game starts?It's possible ULX might have loaded this part of code before DarkRP initialized it's code, and is being run too soon, before the DarkRp lua exists yet.--Tried using format GiveMoney( target_ply, money)?I've never fully understood the technical why, but I've seen some commands not allow the <target>:<Command>(variable) format.

Logged

The price one pays for pursuing any profession or calling is an intimate knowledge of its ugly side. - James Baldwin

Make sure to double-check your command setup. You will get odd errors because your command arguments are not being parsed correctly. You intend to have a command that takes 2 parameters, but only have a single cmd:addParam instruction. Start with a tiny piece of working code. Make small changes and verify that they work correctly. This makes it much easier to pinpoint mistakes! Use print to display the contents of your arguments in the server console.

Is this a server side only command? Or a client side only command?Though it can still live in /sh (shared), if it's either one or the other, you'd need to specify a comparison to ensure it's only being run where it's supposed to (server or client).

Wouldn't it have to run on the server as you'd be giving another player the money? How would I go about specifying a comparison?

Other than that, I actually think it would have worked, but I made it "AddMoney" instead of "addMoney".