Author Topic: RTB Pref Help  (Read 822 times)

EDIT: JVS Doors does this, I found what I was looking for.
Here is a code snippet for reference:

RTB_registerPref("Door Brick Category","JVS Doors","$JVS::Doors::Category","string 10","JVS_Doors","JVS",1,1);

"string 10" was what I was looking for, where string is the type and 10 is (I assume) the maximum string length.





I'm sorry if the topic title is vague, I'm not sure what to name this topic.

Anyways, I want to make an RTB Pref. However I don't want to change a number, I want to set a message.

Code: [Select]
RTB_registerPref stuff here "int 100 10000" more stuff here
I can see that that would change an integer, how do I make it change the variable to some text?

I apologize in advance for having to ask this, but I don't recall having any add-ons that do this.
« Last Edit: April 06, 2010, 07:06:50 PM by SpreadsPlague »

RTB_registerPref("Disable Bot Painting","Bot Events","$Pref::Server::DisableBotPainting","bool","Event_Bots", true, false, false); //Pref option name, pref category, pref variable, pref type (same as event registry), add-on name, default value, requires restart, host only

It's kind of the same as registering output events and the output parameters. Here are the types:
Known types:
int MININUM MAXIMUM DEFAULT (Integer, must be a whole number but can be below zero)
float MINIMUM MAXIMUM STEPSIZE DEFAULT (Floating point number. Displays a slider which snaps to the nearest (stepsize) amount when you drag it and let go.)
list ITEM returnNo. ITEM returnNo. ITEM returnNo. (Returns returnNo. when the item before it is selected?)
bool (Checkbox)
intList NUMBER (List of integers, separated by spaces. The number is the text box length.)
datablock TYPE (Either a datablock type like ProjectileData or ItemData, shows all ones with uiNames, or something like "Vehicle" or "Music" which shows valid music audioProfiles and all rideable vehicles, including player-based ones like Horses)
string CHARACTERS LENGTH (Displays a text box of length LENGTH which can hold up to CHARACTERS letters or numbers)
vector (Displays three boxes which let you input a 3d vector)
paintColor 0 (Displays a selector for a paint colour type. I am not sure what function the 0 has.)

Thank you both very much. I didn't know about all of those types.

RTB actually only supports int, list, bool and string as variable types at the moment.