| Blockland Forums > Modification Help |
| RTB preference issue |
| (1/1) |
| takato14:
Ok, I haven't touched a CS in a while, so just bear with me. My RTB prefs arent working. --- Code: ---///////////////// //--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; } --- End code --- 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. |
| Navigation |
| Message Index |