Ulysses
General => Developers Corner => Topic started by: thymason122 on May 22, 2016, 03:14:51 PM
-
My ULib/ULX versions:
ULib v2.60d (02/17/16)
ULX v3.70d (03/20/16)
GM: Murder (But its a global question)
Right now I'm trying to make a preset entity command (or "ulx ent") so people can just type the command in chat or press a button in the menu.
I tried taking a look at the rcon file (where the ent command is) and I can't really understand on how to make it preset.
So basically this custom command would be like the ent command, with the class name as:
prop_physics
and the params being:
model:models/props_junk/garbage_glassbottle001a.mdl
This would spawn a bottle. I don't want the fillout params because it would allow the rank to abuse the feature.
If you have any suggestions, lemme know! Thanks!
-
Why not create a wrapper ulx command that just calls ulx.ent, passing in the appropriate arguments?
-
How would I do that? I'm more of a newb to custom ULX commands.
-
This isn't Facepunch. You're not getting lost in the speed of topics here.
Bump one more time and I'm banning you a month.
We understand you want help.
For the time it took you to bump twice, you could have looked through ULX code in Github to see how commands are done, or found any number of tutorials here on our site.
-
I understand that. I already made a facepunch thread. They told me to come here, hence why my account is so new. And my question was just asking on how to make a wrapper command and what it is. Sorry if it seems like I have a tude, but I really would like this done. I've been waiting for an answer for 8 hours (From the start of my FP thread.)
-
I'm just freeflowing here, so I prob did something stupid, but something like this..
function ulx.ent_bottle( calling_ply )
ulx.ent(calling_ply, "prop_physics", "model:models/props_junk/garbage_glassbottle001a.mdl")
end
local ent_bottle = ulx.command( "A_CATEGORY_NAME", "ulx ent_bottle", ulx.ent_bottle)
ent_bottle:defaultAccess( ULib.ACCESS_SUPERADMIN )
ent_bottle:help( "Spawn a bottle" )