CATEGORY_NAME = "Custom Commands by Pot"
function ulx.cookie( calling_ply, target_ply, dmg )
local affected_plys = {}
for i=1, #target_ply do
local v = target_ply[ i ]
if v:IsFrozen() then
ULib.tsayError( calling_ply, v:Nick() .. " is frozen!", true )
else
ULib.cookie( v, dmg )
table.insert( affected_plys, v )
end
end
ulx.fancyLogAdmin( calling_ply, "#A gave #T #i cookies!", affected_plys, dmg )
end
local cookie = ulx.command( CATEGORY_NAME, "ulx cookie", ulx.cookie, "!cookie" )
cookie:addParam{ type=ULib.cmds.PlayerArg }
cookie:addParam{ type=ULib.cmds.NumArg, min=0, default=0, hint="damage", ULib.cmds.optional, ULib.cmds.round }
cookie:defaultAccess( ULib.ACCESS_ADMIN )
cookie:help( "Gives someone cookies!" )
That is what I have, but it still wont work. I tried to do what Bytewave said but it was confusing for me. I am still a little new to working with ULX