General > Developers Corner

Questions! Questions! Questions!

<< < (8/12) > >>

Stickly Man!:
Where exactly in XGUI? On the cmds tab?

Bite That Apple:

--- Quote from: Stickly Man! on March 25, 2015, 07:11:45 PM ---Where exactly in XGUI? On the cmds tab?

--- End quote ---

Yeah, like the fun.lua stuff.

Also please excuse my very simple and dumbed down language, I recently was in a vehicle collision, which has caused some brain bruising. So at the moment while my brain is repairing itself, I'm unable to think of a way to do this, and I am having a hard time picking up lua, so any terms you may use, try to keep to a minimum, as I'm trying to take it easy, without putting too much stress on something.

edit:
So bare with me if you explain something to me, I might ask another question.

Stickly Man!:
The user-interface on the CMDS tab is generated automatically- XGUI does not have an easy way to customize that. The only way I can think of making a list with default values would probably be to make your NumArg (like hp amount) a StringArg instead. From there, you can set autocompletes with your default values. That will make it so they get a list of numbers to choose from, but then they can also type anything they want in. (You'll have to make sure what they enter is a valid number, of course).

You might even be able to specify command-level restrictions so that they can only pick certain values.. You should take a look at the 'ulx map' command for an example of that (I think).

Does that sorta make sense? :P

Bite That Apple:

--- Quote from: Stickly Man! on March 26, 2015, 07:35:23 AM ---The user-interface on the CMDS tab is generated automatically- XGUI does not have an easy way to customize that. The only way I can think of making a list with default values would probably be to make your NumArg (like hp amount) a StringArg instead. From there, you can set autocompletes with your default values. That will make it so they get a list of numbers to choose from, but then they can also type anything they want in. (You'll have to make sure what they enter is a valid number, of course).

You might even be able to specify command-level restrictions so that they can only pick certain values.. You should take a look at the 'ulx map' command for an example of that (I think).

Does that sorta make sense? :P

--- End quote ---

Well I understand what you're saying, and the first place I looked was util.lua for the map thing. Though, from what you said, it's not possible on how I want it, so sadly, I'll have to wait till it is possible.

Bite That Apple:
Is it possible in ULX to ask if a player has permission to use a certain command? like:

ply:ulx_has_perm('ulx slap') == true ??

I'm not saying I'm lazy, but I have a really hard time using the ulx documents, it like just doesn't like me (i know im doing something wrong but you know, yolo.)

- - -

ignore everything below this, just some notes/comments for myself to remember tomorrow:

scoreboard check !rank position id

!score find me button or check sid

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version