Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local xmlFile
- local tagStatus
- function onTagResourceStart()
- xmlFile = xmlLoadFile("allianceOptions.xml")
- if (not xmlFile) then
- xmlFile = xmlCreateFile("allianceOptions.xml", "allianceOptions.xml")
- xmlNodeSetAttribute(xmlFile, "greenTagsEnabled", "false")
- xmlSaveFile(xmlFile)
- end
- tagStatus = (xmlNodeGetAttribute(xmlFile, "greenTagsEnabled") == "true")
- guiCheckBoxSetSelected(GUI_Checkbox_AllianceTags, tagStatus)
- end
- addEventHandler("onClientResourceStart", resourceRoot, onTagResourceStart)
- function toggleTags()
- tagStatus = guiCheckBoxGetSelected(GUI_Checkbox_AllianceTags)
- xmlNodeSetAttribute(xmlFile, "greenTagsEnabled", tostring(tagStatus))
- xmlSaveFile(xmlFile)
- refreshPlayerTags()
- end
- addEventHandler("onClientGUIClick", GUI_Checkbox_AllianceTags, toggleTags, false)
Add Comment
Please, Sign In to add comment