
Absence2
Members-
Posts
267 -
Joined
-
Last visited
Everything posted by Absence2
-
I'm trying to make one of the tab to be able to use LUA within it, the "stats" tabpanel so it displays the player "looking" at the 'stats' panel >> their stats, like Char name: IP: and so on, like in the different script on page 1. I need to use LUA in one tabpanel.. but how? EDIT: like this: addEventHandler( "onClientRender", getRootElement(), function() if guiGetVisible(Window) and isElement( player ) then guiSetText ( Label[1], "Name: " .. getPlayerName(player) .. " (" .. getElementData( player, "gameaccountusername" ) .. ")") local x, y, z = getElementPosition(player) guiSetText ( Label[13], "X: " .. x ) guiSetText ( Label[14], "Y: " .. y ) guiSetText ( Label[15], "Z: " .. z ) guiSetText ( Label[3], "Money: $" .. exports.global:getMoney( player ) .. " (Bank: $" .. getElementData( player, "bankmoney" ) .. ")") guiSetText ( Label[4], "Health: " .. math.ceil( getElementHealth( player ) ) ) guiSetText ( Label[5], "Armour: " .. math.ceil( getPedArmor( player ) ) ) guiSetText ( Label[6], "Skin: " .. getElementModel( player ) ) local weapon = getPedWeapon( player ) if weapon then weapon = getWeaponNameFromID( weapon ) else weapon = "N/A" end guiSetText ( Label[7], "Weapon: " .. weapon ) local team = getPlayerTeam(player) if team then guiSetText ( Label[8], "Faction: " .. getTeamName(team) ) else guiSetText ( Label[8], "Faction: N/A") end guiSetText ( Label[9], "Ping: " .. getPlayerPing( player ) ) local vehicle = getPedOccupiedVehicle( player ) if vehicle then guiSetText ( Label[10], "Vehicle: " .. getVehicleName( vehicle ) .. " (" ..getElementData( vehicle, "dbid" ) .. ")" ) else guiSetText ( Label[10], "Vehicle: N/A") end guiSetText ( Label[12], "Location: " .. getZoneName( x, y, z ) ) guiSetText ( Label[16], "Interior: " .. getElementInterior( player ) ) guiSetText ( Label[17], "Dimension: " .. getElementDimension( player ) ) guiSetText ( Label[20], "Hours Ingame: " .. ( getElementData( player, "hoursplayed" ) or 0 ) ) end end )
-
Working now I had to make seperate .lua to make it work but how do I add .lua in the .xml so it displays char stats (like the script above)??
-
Ok, I'll give it a try but.. it is somehow FILLED with errors now, I have no idea why, they just appeared out of nowhere. addEventHandler("onClientResourceStart",resourceRoot, function() GUIEditor_Button = {} GUIEditor_Button[1] = guiCreateButton(732,9,63,18,"Updates",false) guiSetAlpha(GUIEditor_Button[1],0) GUIEditor_Button[2] = guiCreateButton(737,6,58,20,"Updates",false) GUIEditor_Button[3] = guiCreateButton(685,6,47,21,"Rules",false) addEventHandler("onClientGUIClick", GUIEditor_Button[3], showRules) addEventHandler("onClientGUIClick", GUIEditor_Button[2], showUpdates) end ) function showRules() if ( myWindow == nil ) then myWindow = guiCreateWindow ( 0.10, 0.10, 0.80, 0.80, "TwinGold Roleplay Server Rules [F9 Toggle]", true ) local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow ) local tabRules = guiCreateTab( "Rules", tabPanel ) local paneRules = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules) local tabRules2 = guiCreateTab( "Rules II", tabPanel ) local paneRules2 = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules2) local tabOverview = guiCreateTab( "Roleplay Overview", tabPanel ) local tabPowergaming = guiCreateTab( "Powergaming", tabPanel ) local tabMetagaming = guiCreateTab( "Metagaming", tabPanel ) local tabCommonSense = guiCreateTab( "Common Sense", tabPanel ) local tabRevengeKilling = guiCreateTab( "Revenge Killing", tabPanel ) --------- guiScrollPaneSetScrollBars(paneRules, false, true) local xml1 = xmlLoadFile( "serverrules.xml" ) local contents1 = xmlNodeGetValue( xml1 ) local xml2 = xmlLoadFile( "serverrules2.xml" ) local contents2 = xmlNodeGetValue( xml2 ) local xml3 = xmlLoadFile( "whatisroleplaying.xml" ) local contents3 = xmlNodeGetValue( xml3 ) local xml4 = xmlLoadFile( "powergaming.xml" ) local contents4 = xmlNodeGetValue( xml4 ) local xml5 = xmlLoadFile( "metagaming.xml" ) local contents5 = xmlNodeGetValue( xml5 ) local xml6 = xmlLoadFile( "commonsense.xml" ) local contents6 = xmlNodeGetValue( xml6 ) local xml7 = xmlLoadFile( "revengekilling.xml" ) local contents7 = xmlNodeGetValue( xml7 ) --------- guiCreateLabel(0.00,0.00,0.94,1.4,contents1,true,paneRules) guiCreateLabel(0.00,0.00,0.94,1.4,contents2,true,paneRules2) guiCreateLabel(0.02,0.04,0.94,0.92,contents3,true,tabOverview) guiCreateLabel(0.02,0.04,0.94,0.92,contents4,true,tabPowergaming) guiCreateLabel(0.02,0.04,0.94,0.92,contents5,true,tabMetagaming) guiCreateLabel(0.02,0.04,0.94,0.92,contents6,true,tabCommonSense) guiCreateLabel(0.02,0.04,0.94,0.92,contents7,true,tabRevengeKilling) showCursor ( true ) else destroyElement(myWindow) myWindow = nil showCursor(false) end end function showUpdates() if ( myWindow == nil ) then myWindow = guiCreateWindow ( 0.10, 0.10, 0.40, 0.40, "TwinGold Roleplay User Panel", true ) local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow ) local tabRules = guiCreateTab( "Stats", tabPanel ) local paneRules = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules) local tabRules2 = guiCreateTab( "Updates", tabPanel ) local paneRules2 = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules2) local tabOverview = guiCreateTab( "Server Info", tabPanel ) --------- guiScrollPaneSetScrollBars(paneRules, false, true) local xml1 = xmlLoadFile( "stats.xml" ) local contents1 = xmlNodeGetValue( xml1 ) local xml2 = xmlLoadFile( "updates.xml" ) local contents2 = xmlNodeGetValue( xml2 ) local xml3 = xmlLoadFile( "serverinfo.xml" ) local contents3 = xmlNodeGetValue( xml3 ) --------- guiCreateLabel(0.00,0.00,0.94,1.4,contents1,true,paneStats) guiCreateLabel(0.00,0.00,0.94,1.4,contents2,true,paneUpdates) guiCreateLabel(0.02,0.04,0.94,0.92,contents3,true,tabServerInfo) showCursor ( true ) else destroyElement(myWindow) myWindow = nil showCursor(false) end end Is there something wrong? Every line between 80-90 shows an error. "Expected string" & "Bad argument" xml shows behind the chatbox..
-
error: attempt to call global 'LuaLoadFile' (a nil value) also I thought was supposed to be there so it would add itself to the GUI window can't I just let it call to a xml but the file itself is a .lua? in luaLoadFile ?
-
Well, no, I deleted the .xml file, replaced it with a .lua file and added the script above. I'm trying to make the 'stats' show player stats, but adding lua scripts to it doesn't seem to work this is what I got now addEventHandler("onClientResourceStart",resourceRoot, function() GUIEditor_Button = {} GUIEditor_Button[1] = guiCreateButton(732,9,63,18,"Updates",false) guiSetAlpha(GUIEditor_Button[1],0) GUIEditor_Button[2] = guiCreateButton(737,6,58,20,"Updates",false) GUIEditor_Button[3] = guiCreateButton(685,6,47,21,"Rules",false) addEventHandler("onClientGUIClick", GUIEditor_Button[3], showRules) addEventHandler("onClientGUIClick", GUIEditor_Button[2], showUpdates) end ) function showRules() if ( myWindow == nil ) then myWindow = guiCreateWindow ( 0.10, 0.10, 0.80, 0.80, "TwinGold Roleplay Server Rules [F9 Toggle]", true ) local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow ) local tabRules = guiCreateTab( "Rules", tabPanel ) local paneRules = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules) local tabRules2 = guiCreateTab( "Rules II", tabPanel ) local paneRules2 = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules2) local tabOverview = guiCreateTab( "Roleplay Overview", tabPanel ) local tabPowergaming = guiCreateTab( "Powergaming", tabPanel ) local tabMetagaming = guiCreateTab( "Metagaming", tabPanel ) local tabCommonSense = guiCreateTab( "Common Sense", tabPanel ) local tabRevengeKilling = guiCreateTab( "Revenge Killing", tabPanel ) --------- guiScrollPaneSetScrollBars(paneRules, false, true) local xml1 = xmlLoadFile( "serverrules.xml" ) local contents1 = xmlNodeGetValue( xml1 ) local xml2 = xmlLoadFile( "serverrules2.xml" ) local contents2 = xmlNodeGetValue( xml2 ) local xml3 = xmlLoadFile( "whatisroleplaying.xml" ) local contents3 = xmlNodeGetValue( xml3 ) local xml4 = xmlLoadFile( "powergaming.xml" ) local contents4 = xmlNodeGetValue( xml4 ) local xml5 = xmlLoadFile( "metagaming.xml" ) local contents5 = xmlNodeGetValue( xml5 ) local xml6 = xmlLoadFile( "commonsense.xml" ) local contents6 = xmlNodeGetValue( xml6 ) local xml7 = xmlLoadFile( "revengekilling.xml" ) local contents7 = xmlNodeGetValue( xml7 ) --------- guiCreateLabel(0.00,0.00,0.94,1.4,contents1,true,paneRules) guiCreateLabel(0.00,0.00,0.94,1.4,contents2,true,paneRules2) guiCreateLabel(0.02,0.04,0.94,0.92,contents3,true,tabOverview) guiCreateLabel(0.02,0.04,0.94,0.92,contents4,true,tabPowergaming) guiCreateLabel(0.02,0.04,0.94,0.92,contents5,true,tabMetagaming) guiCreateLabel(0.02,0.04,0.94,0.92,contents6,true,tabCommonSense) guiCreateLabel(0.02,0.04,0.94,0.92,contents7,true,tabRevengeKilling) showCursor ( true ) else destroyElement(myWindow) myWindow = nil showCursor(false) end end function showUpdates() if ( myWindow == nil ) then myWindow = guiCreateWindow ( 0.10, 0.10, 0.40, 0.40, "TwinGold Roleplay User Panel", true ) local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow ) local tabRules = guiCreateTab( "Stats", tabPanel ) local paneRules = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules) local tabRules2 = guiCreateTab( "Updates", tabPanel ) local paneRules2 = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules2) local tabOverview = guiCreateTab( "Server Info", tabPanel ) --------- guiScrollPaneSetScrollBars(paneRules, false, true) local lua1 = luaLoadFile( "stats.lua" ) local contents1 = xmlNodeGetValue( xml1 ) local xml2 = xmlLoadFile( "updates.xml" ) local contents2 = xmlNodeGetValue( xml2 ) local xml3 = xmlLoadFile( "serverinfo.xml" ) local contents3 = xmlNodeGetValue( xml3 ) --------- guiCreateLabel(0.00,0.00,0.94,1.4,contents1,true,paneStats) guiCreateLabel(0.00,0.00,0.94,1.4,contents2,true,paneUpdates) guiCreateLabel(0.02,0.04,0.94,0.92,contents3,true,tabServerInfo) showCursor ( true ) else destroyElement(myWindow) myWindow = nil showCursor(false) end end > this is the stats.lua file addEventHandler( "onClientRender", getRootElement(), function() if guiGetVisible(Window) and isElement( player ) then guiSetText ( Label[1], "Name: " .. getPlayerName(player) .. " (" .. getElementData( player, "gameaccountusername" ) .. ")") local x, y, z = getElementPosition(player) guiSetText ( Label[13], "X: " .. x ) guiSetText ( Label[14], "Y: " .. y ) guiSetText ( Label[15], "Z: " .. z ) guiSetText ( Label[3], "Money: $" .. exports.global:getMoney( player ) .. " (Bank: $" .. getElementData( player, "bankmoney" ) .. ")") guiSetText ( Label[4], "Health: " .. math.ceil( getElementHealth( player ) ) ) guiSetText ( Label[5], "Armour: " .. math.ceil( getPedArmor( player ) ) ) guiSetText ( Label[6], "Skin: " .. getElementModel( player ) ) local weapon = getPedWeapon( player ) if weapon then weapon = getWeaponNameFromID( weapon ) else weapon = "N/A" end guiSetText ( Label[7], "Weapon: " .. weapon ) local team = getPlayerTeam(player) if team then guiSetText ( Label[8], "Faction: " .. getTeamName(team) ) else guiSetText ( Label[8], "Faction: N/A") end guiSetText ( Label[9], "Ping: " .. getPlayerPing( player ) ) local vehicle = getPedOccupiedVehicle( player ) if vehicle then guiSetText ( Label[10], "Vehicle: " .. getVehicleName( vehicle ) .. " (" ..getElementData( vehicle, "dbid" ) .. ")" ) else guiSetText ( Label[10], "Vehicle: N/A") end guiSetText ( Label[12], "Location: " .. getZoneName( x, y, z ) ) guiSetText ( Label[16], "Interior: " .. getElementInterior( player ) ) guiSetText ( Label[17], "Dimension: " .. getElementDimension( player ) ) guiSetText ( Label[20], "Hours Ingame: " .. ( getElementData( player, "hoursplayed" ) or 0 ) ) end end )
-
Thanks, worked now I'm trying to use this addEventHandler( "onClientRender", getRootElement(), function() if guiGetVisible(Window) and isElement( player ) then guiSetText ( Label[1], "Name: " .. getPlayerName(player) .. " (" .. getElementData( player, "gameaccountusername" ) .. ")") local x, y, z = getElementPosition(player) guiSetText ( Label[13], "X: " .. x ) guiSetText ( Label[14], "Y: " .. y ) guiSetText ( Label[15], "Z: " .. z ) guiSetText ( Label[3], "Money: $" .. exports.global:getMoney( player ) .. " (Bank: $" .. getElementData( player, "bankmoney" ) .. ")") guiSetText ( Label[4], "Health: " .. math.ceil( getElementHealth( player ) ) ) guiSetText ( Label[5], "Armour: " .. math.ceil( getPedArmor( player ) ) ) guiSetText ( Label[6], "Skin: " .. getElementModel( player ) ) local weapon = getPedWeapon( player ) if weapon then weapon = getWeaponNameFromID( weapon ) else weapon = "N/A" end guiSetText ( Label[7], "Weapon: " .. weapon ) local team = getPlayerTeam(player) if team then guiSetText ( Label[8], "Faction: " .. getTeamName(team) ) else guiSetText ( Label[8], "Faction: N/A") end guiSetText ( Label[9], "Ping: " .. getPlayerPing( player ) ) local vehicle = getPedOccupiedVehicle( player ) if vehicle then guiSetText ( Label[10], "Vehicle: " .. getVehicleName( vehicle ) .. " (" ..getElementData( vehicle, "dbid" ) .. ")" ) else guiSetText ( Label[10], "Vehicle: N/A") end guiSetText ( Label[12], "Location: " .. getZoneName( x, y, z ) ) guiSetText ( Label[16], "Interior: " .. getElementInterior( player ) ) guiSetText ( Label[17], "Dimension: " .. getElementDimension( player ) ) guiSetText ( Label[20], "Hours Ingame: " .. ( getElementData( player, "hoursplayed" ) or 0 ) ) end end ) but weow it bugged when I tried! I changed the stats to stats.lua btw > had to restart the server because it messed up every cmd there is, anyways, how to add this? Everything went 'nil'
-
Yes, thanks But this, why wont it work?: addEventHandler("onClientResourceStart",resourceRoot, function() GUIEditor_Button = {} GUIEditor_Button[1] = guiCreateButton(732,9,63,18,"Updates",false) guiSetAlpha(GUIEditor_Button[1],0) GUIEditor_Button[2] = guiCreateButton(737,6,58,20,"Updates",false) GUIEditor_Button[3] = guiCreateButton(685,6,47,21,"Rules",false) addEventHandler("onClientGUIClick", GUIEditor_Button[3], showRules) addEventHandler("onClientGUIClick", GUIEditor_Button[2], showUpdates) end end end ) function showRules() if ( myWindow == nil ) then myWindow = guiCreateWindow ( 0.10, 0.10, 0.80, 0.80, "TwinGold Roleplay Server Rules [F9 Toggle]", true ) local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow ) local tabRules = guiCreateTab( "Rules", tabPanel ) local paneRules = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules) local tabRules2 = guiCreateTab( "Rules II", tabPanel ) local paneRules2 = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules2) local tabOverview = guiCreateTab( "Roleplay Overview", tabPanel ) local tabPowergaming = guiCreateTab( "Powergaming", tabPanel ) local tabMetagaming = guiCreateTab( "Metagaming", tabPanel ) local tabCommonSense = guiCreateTab( "Common Sense", tabPanel ) local tabRevengeKilling = guiCreateTab( "Revenge Killing", tabPanel ) --------- guiScrollPaneSetScrollBars(paneRules, false, true) local xml1 = xmlLoadFile( "serverrules.xml" ) local contents1 = xmlNodeGetValue( xml1 ) local xml2 = xmlLoadFile( "serverrules2.xml" ) local contents2 = xmlNodeGetValue( xml2 ) local xml3 = xmlLoadFile( "whatisroleplaying.xml" ) local contents3 = xmlNodeGetValue( xml3 ) local xml4 = xmlLoadFile( "powergaming.xml" ) local contents4 = xmlNodeGetValue( xml4 ) local xml5 = xmlLoadFile( "metagaming.xml" ) local contents5 = xmlNodeGetValue( xml5 ) local xml6 = xmlLoadFile( "commonsense.xml" ) local contents6 = xmlNodeGetValue( xml6 ) local xml7 = xmlLoadFile( "revengekilling.xml" ) local contents7 = xmlNodeGetValue( xml7 ) --------- guiCreateLabel(0.00,0.00,0.94,1.4,contents1,true,paneRules) guiCreateLabel(0.00,0.00,0.94,1.4,contents2,true,paneRules2) guiCreateLabel(0.02,0.04,0.94,0.92,contents3,true,tabOverview) guiCreateLabel(0.02,0.04,0.94,0.92,contents4,true,tabPowergaming) guiCreateLabel(0.02,0.04,0.94,0.92,contents5,true,tabMetagaming) guiCreateLabel(0.02,0.04,0.94,0.92,contents6,true,tabCommonSense) guiCreateLabel(0.02,0.04,0.94,0.92,contents7,true,tabRevengeKilling) showCursor ( true ) else destroyElement(myWindow) myWindow = nil showCursor(false) end end function showUpdates() if ( myWindow == nil ) then myWindow = guiCreateWindow ( 0.10, 0.10, 0.40, 0.40, "TwinGold Roleplay User Panel", true ) local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow ) local tabRules = guiCreateTab( "Stats", tabPanel ) local paneRules = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules) local tabRules2 = guiCreateTab( "Updates", tabPanel ) local paneRules2 = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules2) local tabOverview = guiCreateTab( "Server Info", tabPanel ) --------- guiScrollPaneSetScrollBars(paneRules, false, true) local xml1 = xmlLoadFile( "stats.xml" ) local contents1 = xmlNodeGetValue( xml1 ) local xml2 = xmlLoadFile( "updates.xml" ) local contents2 = xmlNodeGetValue( xml2 ) local xml3 = xmlLoadFile( "serverinfo.xml" ) local contents3 = xmlNodeGetValue( xml3 ) --------- guiCreateLabel(0.00,0.00,0.94,1.4,contents1,true,paneStats) guiCreateLabel(0.00,0.00,0.94,1.4,contents2,true,paneUpdates) guiCreateLabel(0.02,0.04,0.94,0.92,contents3,true,tabServerInfo) showCursor ( true ) else destroyElement(myWindow) myWindow = nil showCursor(false) end end 15: ) expected near (to close ( at line 1 ) near 'end'
-
It is F1, isn't it?
-
Thank you, works very well Btw, that "Information About Roleplay" is bugging! It doesn't let me scroll all the way down so only a 1/2 shows including on the sides < > Also, there's something wrong with the cursor ('M'), you can't toggle the cursor if you haven't pressed F9 twice.
-
Hello there, today I tried myself on the 'Guieditor' I found on community > resources, anyways, I'm trying to add two buttons in the top left corner with it. That part was quite easy, this is what I got, I'm trying to figure out how to make them clickable > adding the "Rules" button clickable together with the second script. If you click 'Rules', the window would show! addEventHandler("onClientResourceStart",resourceRoot, function() GUIEditor_Button = {} GUIEditor_Button[1] = guiCreateButton(732,9,63,18,"Updates",false) guiSetAlpha(GUIEditor_Button[1],0) GUIEditor_Button[2] = guiCreateButton(737,6,58,20,"Updates",false) GUIEditor_Button[3] = guiCreateButton(685,6,47,21,"Rules",false) end ) if ( myWindow == nil ) then myWindow = guiCreateWindow ( 0.20, 0.20, 0.6, 0.6, "Information about Roleplaying", true ) local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow ) local tabRules = guiCreateTab( "Rules", tabPanel ) local paneRules = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules) local tabRules2 = guiCreateTab( "Rules II", tabPanel ) local paneRules2 = guiCreateScrollPane(0.02, 0.02, 0.95, 0.95, true, tabRules2) local tabOverview = guiCreateTab( "Roleplay Overview", tabPanel ) local tabPowergaming = guiCreateTab( "Powergaming", tabPanel ) local tabMetagaming = guiCreateTab( "Metagaming", tabPanel ) local tabCommonSense = guiCreateTab( "Common Sense", tabPanel ) local tabRevengeKilling = guiCreateTab( "Revenge Killing", tabPanel ) --------- guiScrollPaneSetScrollBars(paneRules, false, true) local xml1 = xmlLoadFile( "serverrules.xml" ) local contents1 = xmlNodeGetValue( xml1 ) local xml2 = xmlLoadFile( "serverrules2.xml" ) local contents2 = xmlNodeGetValue( xml2 ) local xml3 = xmlLoadFile( "whatisroleplaying.xml" ) local contents3 = xmlNodeGetValue( xml3 ) local xml4 = xmlLoadFile( "powergaming.xml" ) local contents4 = xmlNodeGetValue( xml4 ) local xml5 = xmlLoadFile( "metagaming.xml" ) local contents5 = xmlNodeGetValue( xml5 ) local xml6 = xmlLoadFile( "commonsense.xml" ) local contents6 = xmlNodeGetValue( xml6 ) local xml7 = xmlLoadFile( "revengekilling.xml" ) local contents7 = xmlNodeGetValue( xml7 ) --------- guiCreateLabel(0.00,0.00,0.94,1.4,contents1,true,paneRules) guiCreateLabel(0.00,0.00,0.94,1.4,contents2,true,paneRules2) guiCreateLabel(0.02,0.04,0.94,0.92,contents3,true,tabOverview) guiCreateLabel(0.02,0.04,0.94,0.92,contents4,true,tabPowergaming) guiCreateLabel(0.02,0.04,0.94,0.92,contents5,true,tabMetagaming) guiCreateLabel(0.02,0.04,0.94,0.92,contents6,true,tabCommonSense) guiCreateLabel(0.02,0.04,0.94,0.92,contents7,true,tabRevengeKilling) showCursor ( true ) else destroyElement(myWindow) myWindow = nil showCursor(false) end end end