Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Dec 6th, 2018 54 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. local xmlFile
  2. local tagStatus
  3.  
  4. function onTagResourceStart()
  5.     xmlFile = xmlLoadFile("allianceOptions.xml")
  6.     if (not xmlFile) then
  7.         xmlFile = xmlCreateFile("allianceOptions.xml", "allianceOptions.xml")
  8.         xmlNodeSetAttribute(xmlFile, "greenTagsEnabled", "false")
  9.         xmlSaveFile(xmlFile)
  10.     end
  11.     tagStatus = (xmlNodeGetAttribute(xmlFile, "greenTagsEnabled") == "true")
  12.     guiCheckBoxSetSelected(GUI_Checkbox_AllianceTags, tagStatus)
  13. end
  14. addEventHandler("onClientResourceStart", resourceRoot, onTagResourceStart)
  15.  
  16. function toggleTags()
  17.     tagStatus = guiCheckBoxGetSelected(GUI_Checkbox_AllianceTags)
  18.     xmlNodeSetAttribute(xmlFile, "greenTagsEnabled", tostring(tagStatus))
  19.     xmlSaveFile(xmlFile)
  20.     refreshPlayerTags()
  21. end
  22. addEventHandler("onClientGUIClick", GUI_Checkbox_AllianceTags, toggleTags, false)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top