Jump to content

wlasser

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by wlasser

  1. Oh, please... I hope that never happiens, because nobody cares
  2. And? You are going here to cry about it? That dude doing all well.
  3. Hello guys, thank's for visiting that post. I'm looking for some people, whom have a small knowledge about scripting and comunnication with database (prefer MYSQL) There is some RPG-style project with many lore from tv-series of "Supernatural", and wanna to start that on with nex season start. What i have now - basic event system with spawning bots, and you need to kill them - look's like grind quest in MMORPG, or something. Login system basic - storing skins and players in MYSQL (not done at all). Vehicle shop - that is downloaded from MTA resources, and needed to some rewrite and make it with some feautere - like gasoline, models and some other stuff. What i wanna - i need write some concept for that, but in ideal - i wanna make from MTA somelike MMORPG, without "massive". I am newbie in lua and MTA API, but faster studing. Thank's for reply.
  4. Thank's alot. There is other question, not about GUI. I just need to some direction in understood: how i can check what is weapon used for killing ped's? Can i cancel damage or something, if weapon not is what i need? Next - what is element data and how i can store it into database? And what about security to use internal db? Thank's for answer's.
  5. Thanks guy's. Will be learn all your code.
  6. Now it's work, don't know about proper it... addEventHandler("onClientGUIClick",getResourceRootElement(),buttonClick)
  7. That's didn't work as it. Now i'm rewrite some and get it like it need, but if before - clicking on buttons is working, now - not. How to gedt it work? local sx, sy = guiGetScreenSize ( ) local eventButton function centerGUI ( guiElement ) local width, height = guiGetSize ( guiElement, false ) local x, y = ( sx / 2 - width / 2 ), ( sy / 2 - height / 2 ) guiSetPosition ( guiElement, x, y, false ) end GUIEditor = { tab = {}, staticimage = {}, tabpanel = {}, edit = {}, button = {}, window = {}, label = {} } function showHide() if guiGetVisible(GUIEditor.window[1]) == true then guiSetVisible(GUIEditor.window[1],false) showCursor(false) elseif guiGetVisible(GUIEditor.window[1]) == false then guiSetVisible(GUIEditor.window[1],true) showCursor(true) end end addEventHandler("showHide",getLocalPlayer(),showHide) function showGUI (event) GUIEditor.window[1] = guiCreateWindow(423, 331, 523, 367, "", false) guiSetVisible(GUIEditor.window[1],true) guiWindowSetSizable(GUIEditor.window[1], false) showCursor(true) centerGUI(GUIEditor.window[1]) -- GUIEditor.tabpanel[1] = guiCreateTabPanel(11, 109, 502, 241, false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(5, 5, 153, 42, "Закрыть", false, GUIEditor.window[1]) local memo = guiCreateMemo(11, 109, 502, 241,event['description'],false,GUIEditor.window[1]) guiMemoSetReadOnly(memo, true) GUIEditor.button[2] = guiCreateButton(5, 55, 153, 42, "Принять", false, GUIEditor.window[1]) eventButton = event -- print (event['description']) end addEvent("showEventGUI", true) addEventHandler( "showEventGUI", localPlayer, showGUI ) function buttonClick() outputChatBox("Click") if source == GUIEditor.button[1] then showHide() elseif (source == GUIEditor.button[2]) then -- triggerServerEvent("startEvent") --function startEvent(eventId, player) triggerServerEvent("startEvent",resourceRoot, localPlayer, eventButton['id']) -- there is event_id? showHide() end end addEventHandler("onClientGUIClick",GUIEditor.window[1],buttonClick)
  8. Hello to everybody. There is trouble with creating gui, and i'll try many thing's, but it's work not proper. When player connecting and join - this gui is visible for him. What to do with it? local sx, sy = guiGetScreenSize ( ) local eventButton function centerGUI ( guiElement ) local width, height = guiGetSize ( guiElement, false ) local x, y = ( sx / 2 - width / 2 ), ( sy / 2 - height / 2 ) guiSetPosition ( guiElement, x, y, false ) end GUIEditor = { tab = {}, staticimage = {}, tabpanel = {}, edit = {}, button = {}, window = {}, label = {} } -- guiSetVisible(GUIEditor.window[1],false) GUIEditor.window[1] = guiCreateWindow(423, 331, 523, 367, "", false) guiSetVisible(GUIEditor.window[1],false) guiWindowSetSizable(GUIEditor.window[1], false) centerGUI(GUIEditor.window[1]) -- GUIEditor.tabpanel[1] = guiCreateTabPanel(11, 109, 502, 241, false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(5, 5, 153, 42, "Закрыть", false, GUIEditor.window[1])
×
×
  • Create New...