Jump to content

Cardell

Members
  • Posts

    42
  • Joined

  • Last visited

Everything posted by Cardell

  1. Do you know how i can change my GUI so only admins Can get into it?
  2. Doesnt it save your functions?
  3. Hey Snert, i logged on to my server, made a gui edit of freeroam gui's normal gui, i type /guioutpet and it doesnt do anything?? Wanna come on my serv and help? You can't SEE what guioutput does. Until you close MTA, look in the guiedit folder, and see a file with your GUI data. If you want to see it and be capable of doing Ctrl+C, then you need to do /guiprint. Ive done that, it only says --- --- ---- And on Guiprint its blank
  4. /guiprint or /guioutput? Or do you mean with working buttons? In that case: no. I open my GUi, type /guiprint and its blank, And /guioutput it only has -- --- ---- in the lines
  5. Is there a way you can print code for the whole GUI?
  6. Hey Snert, i logged on to my server, made a gui edit of freeroam gui's normal gui, i type /guioutpet and it doesnt do anything?? Wanna come on my serv and help?
  7. Did you add it as an client side code in the meta.xml? If you know what I mean? Something like... ... <script src="something.lua" [u]type="client"[/u]/> ... If you have some trouble with it, feel free to say so. But I do note that this is in the wiki. gui was already there, im editting freeroam gua, you know any job scripts i can use for people to make money, and too see people run after each other?
  8. Dont Understand adding long GUI, My GUI looks like this function CreateLoginWindow() local X = 0.375 local Y = 0.375 local Width = 0.25 local Height = 0.25 wdwLogin = guiCreateWindow(X, Y, Width, Height, "Please Log In", true) X = 0.0825 Y = 0.2 Width = 0.25 Height = 0.25 guiCreateLabel(X, Y, Width, Height, "Username", true, wdwLogin) Y = 0.5 guiCreateLabel(X, Y, Width, Height, "Password", true, wdwLogin) X = 0.415 Y = 0.2 Width = 0.5 Height = 0.15 edtUser = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) Y = 0.5 edtPass = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) guiEditSetMaxLength(edtUser, 50) guiEditSetMaxLength(edtPass, 50) X = 0.415 Y = 0.7 Width = 0.25 Height = 0.2 btnLogin = guiCreateButton(X, Y, Width, Height, "Log In", true, wdwLogin) guiSetVisible(wdwLogin, false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () CreateLoginWindow() outputChatBox("Welcome to My MTA DM Server, please log in. ") if (wdwLogin ~= nil) then guiSetVisible(wdwLogin, true) end showCursor(true) guiSetInputEnabled(true) end ) addEventHandler("onClientGUIClick", theButtonElement, theHandlerFunction, false) addEventHandler("onClientGUIClick", theButtonElement, theHandlerFunction, false) function clientSubmitLogin(button) if button == "left" then triggerServerEvent("SubmitLogin", getRootElement(), guiGetText(edtUser), guiGetText(edtPass)) guiSetInputEnabled(false) guiSetVisible(wdwLogin, false) showCursor(false) end end function joinHandler(username, password) local x,y,z x = 1959.55 y = -1714.46 z = 10 spawnPlayer(client, x, y, z) fadeCamera(client, true) outputChatBox("Welcome to CardellAutoMTA", client) end end addEvent("SubmitLogin", true) addEventHandler("SubmitLogin", getRootElement(), joinHandler) g_gridListContents = {} -- info about binded gridlists g_openedWindows = {} -- {window1table = true, window2table = true, ...} GRIDLIST_UPDATE_CHUNK_SIZE = 10 classInfo = { wnd = {className = 'Window', padding = {25, 10, 10, 10}, isContainer = true}, tbp = {className = 'TabPanel'}, tab = {className = 'Tab', padding = 10, isContainer = true}, lbl = {className = 'Label', height = 20}, btn = {className = 'Button', height = 20, padding = {0, 4}}, chk = {className = 'CheckBox', height = 20, padding = {0, 6}}, rad = {className = 'RadioButton', height = 20, padding = {0, 10}}, txt = {className = 'Edit', width=100, height = 24}, lst = {className = 'GridList', width = 250, height = 400}, img = {className = 'StaticImage'} } function getTextWidth(text) return 8*text:len() end function createWindow(wnd, rebuild) if wnd.element then if rebuild then destroyElement(wnd.element) else guiSetVisible(wnd.element, true) guiBringToFront(wnd.element) g_openedWindows[wnd] = true if wnd.oncreate then wnd.oncreate() end return end end _planWindow(wnd) _buildWindow(wnd) end function _planWindow(wnd, baseWnd, parentWnd, x, y, maxHeightInLine) -- simulate building a window to get the proper height local wndClass = wnd[1] if not maxHeightInLine then maxHeightInLine = LINE_HEIGHT end local text, padding, parentPadding if wndClass ~= 'br' then padding = classInfo[wndClass].padding if type(padding) == 'number' then padding = table.rep(padding, 4) classInfo[wndClass].padding = padding elseif type(padding) == 'table' then if #padding == 1 then padding = table.rep(padding[1], 4) classInfo[wndClass].padding = padding elseif #padding == 2 then padding = table.flatten(table.rep(padding, 2)) classInfo[wndClass].padding = padding elseif #padding == 3 then table.insert(padding, padding[2]) classInfo[wndClass].padding = padding end elseif not padding then padding = table.rep(0, 4) classInfo[wndClass].padding = padding end text = wnd.text or wnd.id or '' if not wnd.width then wnd.width = (classInfo[wndClass].width or getTextWidth(text)) + (not classInfo[wndClass].isContainer and (padding[2] + padding[4]) or 0) end if not wnd.height and not classInfo[wndClass].isContainer then wnd.height = (classInfo[wndClass].height or LINE_HEIGHT) + padding[1] + padding[3] end end parentPadding = parentWnd and classInfo[parentWnd[1]].padding if wndClass == 'br' or (not classInfo[wndClass].isContainer and x + wnd.width > parentWnd.width - parentPadding[2]) then -- line wrap x = parentPadding[4] y = y + maxHeightInLine + LINE_MARGIN maxHeightInLine = LINE_HEIGHT if wndClass == 'br' then return nil, x, y, maxHeightInLine end end if not wnd.x then wnd.x = x end if not wnd.y then wnd.y = y end wnd.parent = parentWnd if wnd.controls then local childX, childY = padding[4], padding[1] local childMaxHeightInLine = LINE_HEIGHT local control for id, controlwnd in pairs(wnd.controls) do control, childX, childY, childMaxHeightInLine = _planWindow(controlwnd, baseWnd or wnd, wnd, childX, childY, childMaxHeightInLine) end if classInfo[wndClass].isContainer then wnd.height = childY + childMaxHeightInLine + padding[3] end end if wnd.tabs then local maxTabHeight = 0 for id, tab in pairs(wnd.tabs) do tab[1] = 'tab' tab.width = wnd.width _planWindow(tab, baseWnd, wnd) if tab.height > maxTabHeight then maxTabHeight = tab.height end end wnd.height = maxTabHeight end if classInfo[wndClass].isContainer then return elem else if wnd.height > maxHeightInLine then maxHeightInLine = wnd.height end return elem, x + wnd.width + CONTROL_MARGIN_RIGHT, y, maxHeightInLine end end function _buildWindow(wnd, baseWnd, parentWnd) local wndClass = wnd[1] if wndClass == 'br' then return end local relX, relY, relWidth, relHeight if parentWnd then if wnd.x and wnd.y then relX = wnd.x/parentWnd.width relY = wnd.y/parentWnd.height end relWidth = wnd.width / parentWnd.width relHeight = wnd.height / parentWnd.height end local elem if wndClass == 'wnd' then local screenWidth, screenHeight = guiGetScreenSize() if not wnd.x then wnd.x = screenWidth/2 - wnd.width/2 else local i, f = math.modf(wnd.x) if f ~= 0 then
  9. Thanks mate, just back from school wasnt thinking
  10. Tbh, I only want Short Stories, Not ANYTHING else. so dont act like a 13 year old,
  11. just tell me on here, night imma sleep, gnna script and stuff tommorrow, and by questions
  12. with my ext ip ... 79.xx.xxx.xxx My server doesnt work, i cant connect on ip or anything, even when its ip is set blank in conf,is it suppossed to be only my friends who can get on with it or am i supossed to able to aswell? Thanks
  13. Hi all, Can you Scripters help me out im new, 1.teach me how to log in as admin, 2.teach me how to edit the stuff in GUI 3.Teach me how to Make Cars Spawn at places, (Like a Ingame Object tool) 4.Teach me how to make Certain GUI commands Admin Only 5.Teach me how to add peds (Would be nice if you gave me a code with peds everywhere) 6.Teach me how to make Public Places open like for Ex.Ammunation or The Four Dragons 7.please tell me how to add jobs like taxi driver etc to be able to be used to gain cash, 8.admin commands for money,and stuff, gonna add houses with KIHC 9.Give or Tell me how to make a Script for Registering/Logging In with Accounts 10.Other GUI servers i see log in with rules and regulations,please tell me or give script to add 11.Please Tell me How to Add Godmode Command For Admins Please Answer Questions with the number ex. im answering number 1 1.bla bla bla bla Etc, Thanks Feel Free To ask Scripters If you have problems here, I really wanna make the /wp and the car spawn commands admin only, No Flaming, Telling people to search in this thread,Help, be nice, if ur a meany GTFO Thanks people
×
×
  • Create New...