Ok
function GUI()
window = guiCreateWindow(15,75,500,500,"Admin Adding Car",false)
guiWindowSetMovable( Window, false )
guiWindowSetSizable( Window, false )
memo = guiCreateMemo(150,100,250,50,"",false,window)
ok = guiCreateButton(100, 100, 50, 50,"OK",false,window)
label = guiCreateLabel(13,35,500,100,"Cars:",false,window)
guiLabelSetColor(label,255,255,255)
guiLabelSetVerticalAlign(label,"top")
guiLabelSetHorizontalAlign(label,"left",false)
exit = guiCreateButton(171,19,19,19,"X",false,window)
guiSetVisible(window,false)
addEventHandler("onClientGUIClick",exit,exitGUI);
addEventHandler("onClientGUIClick",ok,okcar);
end
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
function ()
GUI()
end
)
function openTeleportWindow()
local PlayerName = getPlayerName(getLocalPlayer())
if PlayerName == "BLABLA" then
guiSetVisible(window,true)
showCursor(true,true)
else return
end
end
addCommandHandler("OpenGUI",openTeleportWindow)
function exitGUI()
if (source == exit) then
guiSetVisible(window,false);
showCursor(false);
end
end
function okcar(button,state)
if button == "left" and state == "up" then
if (source == ok) then
local text = guiGetText ( memo )
outputChatBox ( text )
if (text == "stats") then
outputChatBox("BLABLA",255,0,0);
end
end
end
end