Ok, I haven't touched a CS in a while, so just bear with me. My RTB prefs arent working.
/////////////////
//--RTB PREFS--//
/////////////////
//RTB users can customize the restrictions on this weapon to their liking. For non-RTB users, you can set these values yourself:
$fullAllowed = 1; //Whether or not the SLC charges for the beam
if(isFile("Add-Ons/System_ReturnToBlockland/server.cs"))
{
if(!$RTB::RTBR_ServerControl_Hook)
exec("Add-Ons/System_ReturnToBlockland/RTBR_ServerControl_Hook.cs");
RTB_registerPref("Chargeable Laser", "Shining Laser", "$fullAllowed", "bool", 0, 0, 0);
}
if($fullAllowed == 1)
{
SLCItem.Image = SLCImage;
}
else
{
SLCItem.image = SLCStaticImage;
}
The preference shows up, but it doesn't save my settings; it defaults back to the enabled when I restart the server. I commented out the definition, so when I started the boolean was at 0, but the weapon image didnt switch. What did I do wrong?
--EDIT--
Oh pff, the datablock is SLCZimage, not SLCImage. that part's fixed, but the preference still isnt saving.
Edit: managed to get it working on my own. Locking.