Jump to content

Lloyd Logan

Members
  • Posts

    642
  • Joined

  • Last visited

Everything posted by Lloyd Logan

  1. I'm not using the scripts, i am creating a server from scratch, just giving people an example of what i am talking about!
  2. Hi, I created a topic on this ages ago, but I never found my answer! In big scripts Such as vG, MTA:RP, Vedic etc. there is a folder called mysql, without this the resources using mysql wouldn't work. How do i connect my server to mysql? I am using it as a simple storage. People said to execute querys and stuff, but how does my server get a resource like "mysql"? I am using XAMPP, i have the modules, how to I "integrate MTA SERVER with MySQL? Thanks Lloyd
  3. Thank you very much! I will definately work at this and inform you!
  4. I have been looking for age's for an answer for this, but i am yet to find anything. Maybe a Pro GUI'er will be able to help! Actually I think I found my solution. Although it might not fit perfect, but it looks pretty good so far. I just find the difference in percentage by dividing the new resolution with the old (1920 as x and 1080 as y, the one i originally made it and set it up), and then i get all the elements, their size and their position and i multiply it by the percentage (eg 0.50 for half size and position). If you want I can give you some of my code, although it might need some changes, because its kinda a mess right now, I just managed to make it work alright I'd gladly take some of your code! This has been bugging me for ages!
  5. I have been looking for age's for an answer for this, but i am yet to find anything. Maybe a Pro GUI'er will be able to help!
  6. Nevermind Guys I got it! Thanks All!
  7. Not working? bindKey("F6", "down", function ( ) guiSetVisible( wnd, true ) guiSetVisible( bHealth, true ) guiSetVisible( bDie, true ) showCursor( true ) end ) bindKey ("F6", "down", function ( ) local state = guiGetVisible ( wnd ) guiSetVisible ( wnd, not state ) guiSetVisible ( bHealth, not state ) guiSetVisible ( bDie, not state ) showCursor ( not state ) end )
  8. How do i make it so that when F6 is pressed again the GUI disappears? bindKey("F6", "down", function ( ) guiSetVisible( wnd, true ) guiSetVisible( bHealth, true ) guiSetVisible( bDie, true ) showCursor( true ) end )
  9. It works! But the button remains there?
  10. Sorry, it still doesn't hide? GUIEditor = { button = {}, label = {}, window = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() Window = guiCreateWindow(0, 0, 1279, 715, "Buy A Vehicle", false) guiWindowSetSizable(Window, false) guiSetVisible(Window, false) lInfer = guiCreateLabel(26, 98, 326, 34, "Infernous : $30000", false, GUIEditor.window[1]) guiSetFont(lInfer, "sa-header") guiSetVisible(lInfer, false) bBuy = guiCreateButton(373, 108, 86, 29, "BUY", false, GUIEditor.window[1]) guiSetVisible(bBuy, false) cButton = guiCreateButton(1088, 668, 125, 35, "CLOSE", false, GUIEditor.window[2]) guiSetVisible(GUIEditor.button[3], false) guiSetVisible(cButton, false) end ) local buyVeh = createMarker(1940.5185546875, -1707.1162109375, 12.3828125, "cylinder", 1.5, 255, 255, 0, 170) function showGUIp(hitPlayer) if ( hitPlayer == localPlayer ) then setElementFrozen ( localPlayer, false ) guiSetVisible ( Window, true ) guiSetVisible ( lInfer, true ) guiSetVisible ( bBuy, true ) guiSetVisible (cButton, true) showCursor ( true ) end end addEventHandler ( "onClientMarkerHit", buyVeh, showGUIp ) function initGUI( ) guiSetVisible (Window, false ) guiSetVisible (bBuy, false ) guiSetVisible (lInfer, false ) guiSetVisible (cButton, false ) guiSetInputEnabled ( false ) showCursor ( false ) end addEventHandler ("onClientGUIClick", cButton, initGUI, false )
  11. Thank you! What does the false do at the very end?
  12. I used this, but it didn't work? function initGUI() cButton = guiSetVisible ( Window, false ) cButton = guiSetInputEnabled(false) cButton = showCursor ( false ) end addEventHandler ( "onClientGUIClick", cButton)
  13. Lloyd Logan

    Community Bug

    It's not a bug, it's your browser asking if you would like your information to be reinputted again, for your sake "autoteam". It's like saying you bought something on eBay, you paid with your card then it accepted it, you then wanted to continue "shopping" so you pressed back, there would be a risk of you double paying! This is one of the reasons your browser ask's if you wan't re-input you information.
  14. Have you had a look at the WIKI?
  15. Depends, you will need you write the stuff you would like in your sever (details).
  16. How would i get rid of everything? function initGUI() cButton = guiSetVisible ( Window, false ) cButton = guiSetInputEnabled(false) cButton = showCursor ( false ) end addEventHandler ( "onClientGUIClick", cButton) Or How would i do use destroyElement? Thanks Lloyd
  17. The GU is still there when i login?
  18. Okay, i'll put aside everything apart from the GUI itself, how do make this appear when Marker is hit? Clien: GUIEditor = { button = {}, label = {}, window = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() Window = guiCreateWindow(385, 158, 478, 385, "Buy A Vehicle", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(26, 98, 326, 34, "Infernous : $30000", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") bBuy = guiCreateButton(373, 108, 86, 29, "BUY", false, GUIEditor.window[1]) end ) local buyVeh = createMarker(1940.5185546875, -1707.1162109375, 13.3828125, "cylinder", 1.5, 255, 255, 0, 170) function showGUII() guiSetVisible(Window,true) showCursor(true) end addEvent("showGUII",true) addEventHandler("showGUII", getRootElement(), showGUII) Server: function showGUIp(hitPlayer) setElementFrozen(source, true) triggerClientEvent (hitPlayer,"showGUII") end addEventHandler("onClientMarkerHit", buyMark, showGUIp)
  19. That's what i meant, sorry!
  20. Okay, so will i create a server side event for the money, then trigger it server side?
  21. So, function onClickBtn ( button, state ) if (source == GUIEditor.button[1]) then local x, y, z = getElementPosition(thePlayer) createVehicle(411, x + 2, y, z) outputChatBox("You Have successfully bought an Infernous!", thePlayer) takePlayerMoney ( thePlayer, 30000) end end Is wrong :L I'm not too sure
×
×
  • Create New...