Hallo, ich arbeitet neben bei an einem Teleport Script.
Ein Error/Warnung kommt jedoch nicht, aber das Script startet jedoch wenn ich den BindKey drücke passiert nichts.
Lua
tpgui = {
button = {},
window = {}
}
Showing = false
addEventHandler("onClientResourceStart",resourceRoot,
function()
bindKey("F6","down",createTP)
end)
function createTP()
if Showing == false then else return end
showCursor(true)
tpgui.window[1] = guiCreateWindow(787, 317, 350, 426, "Teleport Menu", false)
guiWindowSetSizable(tpgui.window[1], false)
Showing = true
tpgui.button[1] = guiCreateButton(10, 33, 160, 45, "Los Santos", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[1],function()
setElementPosition ( source, 1480, -1674, 15)
destroyElement(tpgui.window[1])
Showing = false
showCursor(false)
end,false)
tpgui.button[2] = guiCreateButton(10, 88, 160, 45, "San Fierro", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[2],function()
setElementPosition ( source, -1989, 139, 28)
destroyElement(tpgui.window[2])
Showing = false
showCursor(false)
end,false)
tpgui.button[3] = guiCreateButton(10, 147, 160, 45, "Las Venturas", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[3],function()
setElementPosition ( source, 2048, 906, 9)
destroyElement(tpgui.window[1])
Showing = false
showCursor(false)
end,false)
tpgui.button[4] = guiCreateButton(10, 202, 160, 45, "Noobspawn", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[4],function()
setElementPosition ( source, 1833, -1682, 14)
destroyElement(tpgui.window[1])
Showing = false
showCursor(false)
end,false)
tpgui.button[5] = guiCreateButton(10, 257, 160, 45, "Rathaus", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[5],function()
setElementPosition ( source, 1482, -1743, 14)
destroyElement(tpgui.window[1])
Showing = false
showCursor(false)
end,false)
tpgui.button[6] = guiCreateButton(10, 312, 160, 45, "FBI Base", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[6],function()
setElementPosition ( source, 1178, -1740, 14)
destroyElement(tpgui.window[1])
Showing = false
showCursor(false)
end,false)
tpgui.button[7] = guiCreateButton(10, 367, 160, 45, "PD Base", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[7],function()
setElementPosition ( source, 1589, -1620, 14)
destroyElement(tpgui.window[1])
Showing = false
showCursor(false)
end,false)
tpgui.button[8] = guiCreateButton(180, 33, 160, 45, "Los Santos Airport", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[8],function()
setElementPosition ( source, 1963, -2195, 14)
destroyElement(tpgui.window[1])
Showing = false
showCursor(false)
end,false)
tpgui.button[9] = guiCreateButton(180, 88, 160, 45, "San Fierro Airport", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[9],function()
setElementPosition ( source, -1424, -308, 7)
destroyElement(tpgui.window[1])
Showing = false
showCursor(false)
end,false)
tpgui.button[10] = guiCreateButton(180, 147, 160, 45, "Las Venturas Airport", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[10],function()
setElementPosition ( source, 1518, 1447, 11)
destroyElement(tpgui.window[1])
Showing = false
showCursor(false)
end,false)
tpgui.button[11] = guiCreateButton(180, 202, 160, 45, "Krankenhaus", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[11],function()
setElementPosition ( source, 1185, -1323, 14)
destroyElement(tpgui.window[1])
Showing = false
showCursor(false)
end,false)
tpgui.button[12] = guiCreateButton(180, 257, 160, 45, "Bank", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[12],function()
setElementPosition ( source, 1722, -1605, 14)
destroyElement(tpgui.window[1])
Showing = false
showCursor(false)
end,false)
tpgui.button[13] = guiCreateButton(180, 312, 160, 45, "Mount Chilliad", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[13],function()
setElementPosition ( source, -2302, -1634, 484)
destroyElement(tpgui.window[1])
Showing = false
showCursor(false)
end,false)
tpgui.button[14] = guiCreateButton(180, 367, 160, 45, "Army Base", false, tpgui.window[1])
addEventHandler("onClientGUIClick",tpgui.button[14],function()
setElementPosition ( source, 181, 1918, 18)
destroyElement(tpgui.window[1])
Showing = false
showCursor(false)
end,false)
end
Alles anzeigen