Jump to content

Victor214

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by Victor214

  1. Oh, Thanks And sorry for my ignorance, this is my first GUI script Edit : Oh, my brother wrote that, Yeah, Altura and Largura are WIdth and Heigth, i told him to translate to english but he didn't
  2. I learned the basic of lua script, now i'm trying to learn the basic of GUI script, so I started to read at the wiki, I understand almost everything, but i have 2 questions about this GUI script (I copyed the wiki code, but i understood everything), 1 - Why it isn't working? 2 - getResourceRootElement(getThisResource()) <- this! Other thing that I didn't understood is where should I put addEventHandler("onClientGUIClick", btnLogin, clientSubmitLogin, false) ?? PS - there is only the GUI, not the scripting of it. script: function GUI local X = 0.375 local Y = 0.375 local altura = 0.50 local largura = 0.25 wdwLogin = guiCreateWindow(X, Y, Width, Height, "TBG - Painel de Login!", true) X = 0.0825 Y = 0.2 altura = 0.25 largura = 0.25 guiCreateLabel(X, Y, Width, Height, "Login", true, wdwLogin) Y = 0.5 guiCreateLabel(X, Y, Width, Height, "Senha", true, wdwLogin) X = 0.415 Y = 0.2 altura = 0.5 largura = 0.15 edtUser = guiCreateEdit(X, Y, Width, Height, "Seu login aqui", true, wdwLogin) Y = 0.5 edtPass = guiCreateEdit(X, Y, Width, Height, "Sua senha aqui", true, wdwLogin) guiEditSetMaxLength(edtUser, 15) guiEditSetMaxLength(edtPass, 20) X = 0.415 Y = 0.7 Width = 0.25 Height = 0.2 btnLogin = guiCreateButton(X, Y, Width, Height, "Log In", true, wdwLogin) guiSetVisible(wdwLogin, true) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () createLoginWindow() outputChatBox("Bem vindo/a ao TBG - RealPlay!") if (wdwLogin ~= nil) then guiSetVisible(wdwLogin, true) else outputChatBox("Ocorreu um inesperado erro no carregamento no painel de Login, tente reconectar!") end showCursor(true) guiSetInputEnabled(true) end
  3. Just found something that will help me https://wiki.multitheftauto.com/wiki/Event_system Thanks anyway
  4. oO I know it doesn't exist, but how do I create my own one??
  5. Hello guys, I am trying to make a script that will give 1000 Ammo of silenced on the Player FirstJoin but i didn't find any event like : "onPlayerFirstJoin" or something like that. Sorry for the ignorance . Could you guys help me? Thanks
  6. Hello guys, I started to learn script 2 weeks ago, i am trying to improve my Scripting skills, so (sorry for the ignorance), i was writing a REAAALLY Simple Script, just to start a gamemode, and then an error appeared "Bad Argument", i dont know what it is, could you guys help me? Script : function BugFix() local x = 2153 local y = 1012 local z = 12 spawnPlayer(thePlayer, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to the #00FF00 TBG Server!#0000ff Press F1 for info,etc", source, 255, 0, 0, true) end addEventHandler("onPlayerJoin", getRootElement(), BugFix) Error :
×
×
  • Create New...