Jump to content

..:D&G:..

Members
  • Posts

    1,028
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by ..:D&G:..

  1. Hey, I tried searching everywhere but I couldn't find anything usefull so I thought I can just make a post I want to replace the CJ clothes with my own texture, but I don't know how, there is no such function for this If anyone can help me will be grate! P.S: MTA should make a function like replaceCjClothe
  2. This resource had a readme with a link.... This guy is trying to make money over MTA or something... as the link is ad.fly --EDITED-- LOL, all his scripts are like this Readmes with links https://community.multitheftauto.com/index.php?p= ... ls&id=8299 DONE
  3. Hello, I am looking for a snow script with snow that rises slowly when and when the snow fall stops it should stop the snow rising too. I tried to make one myself but I am not good at making scripts with shaders I can offer up to $5 paypal, maybe more if I can.
  4. Hello, its me (again ) I am starting to flood a bit with posts, sorry about that, but I started working on some scripts and I don't really know all the functions and events and how to write them (some). So, I want to know how to trigger a command ''/jump for example'' when clicking a button from a gui. Shall I use this: function jumpbabyjump() triggerServerEvent("jump",getLocalPlayer(),getLocalPlayer()) end addEventHandler ( "onClientGUIClick",bJump,jumpbabyjump, false ) or: executeCommandHandler( "jump", jumpbabyjump)
  5. Here local vehElements = {} -- Functii function showVehicleGui(vehElementsret) if not wvehicle then local width, height = 400, 200 local scrWidth, scrHeight = guiGetScreenSize() local x = scrWidth - width local y = scrHeight/10 wvehicle = guiCreateWindow(x, y, width, height, "Tractari: Recupereaza un vehicul", false) guiWindowSetSizable(wvehicle, false) bInchide = guiCreateButton(0.5, 0.85, 0.2, 0.1, "Iesi", true, wvehicle) bVehicul = guiCreateButton(0.725, 0.85, 0.3, 0.2, "Recupereaza", true, wvehicle) addEventHandler("onClientGUIClick", bClose, hideImpoundUI, false) addEventHandler("onClientGUIClick", bRelease, releaseCar, false) gMasini = guiCreateGridList(0.05, 0.1, 0.9, 0.65, true, wvehicle) addEventHandler("onClientGUIClick", gMasini, updateCar, false) local col = guiGridListAddColumn(gMasini, "Vehicule Confiscate", 0.7) IDcolumn = guiGridListAddColumn(gMasini, "ID", 0.2) vehElements = vehElementsret for key, value in ipairs(vehElements) do local dbid = getElementData(value, "dbid") local row = guiGridListAddRow(gCars) guiGridListSetItemText(gCars, row, col, getVehicleName(value), false, false) guiGridListSetItemText(gCars, row, IDcolumn, tostring(dbid), false, false) end guiGridListSetSelectedItem(gCars, 0, 1) lCost = guiCreateLabel(0.1, 0.85, 0.2, 0.1, "Taxă: 100 lei", true, wvehicle) guiSetFont(lPret, "default-bold-small") updateCar() guiSetInputEnabled(true) end end
  6. I get an error for a script (table expected, got nil) even if there is a table, local vehicles = {}, does anyone know why?
  7. It is, but in server side.. Do I have to trigger something?
  8. What should I use to create that bubble with text? setElementData(button, "tooltip-text", "Your tooltip text goes here", false) setElementData(button, "tooltip-color", "#FFFFFF", false) setElementData(button, "tooltip-background", "#666666", false) ------------------------------------------------EDITED-------------------------- Doesn't matter, I know how it works now! Thanks SOLVED!
  9. Now I get another error... 30: attempt to concatenate global 'finalstring' (a nil value) All the events and functions are in a server side file.
  10. Hey, I want to know whats the easiest way of making a bubble with text on the top of an image when I put my cursor on the image/logo? guiCreateStaticImage
  11. Oh... I am going retarded, how could I forget?! Thanks!
  12. Limbi Vorbite: " .. table.concat(languages, ", ") .. " Table expected, but got nil, when I add the "" to languages, it says that table expected, but got string
  13. Same error... DXgui = { fereastra = {}, copyright = {}, linie = {}, nume = {}, status = {}, buton = {}, skin = {}, logowg = {} } addEventHandler("onClientResourceStart", resourceRoot, function() DXgui.buton[1] = guiCreateButton(907, 109, 29, 25, "X", false, DXgui.fereastra[1]) guiSetFont(DXgui.buton[1], "default-bold-small") DXgui.fereastra[1] = guiCreateStaticImage(323, 139, 614, 338, "imagini/fereastra.png", false) guiSetAlpha(DXgui.fereastra[1], 0.80) DXgui.linie[1] = guiCreateStaticImage(0, 53, 613, 3, "imagini/linie.png", false, DXgui.fereastra[1]) guiSetAlpha(DXgui.linie[1], 0.80) DXgui.logowg[1] = guiCreateStaticImage(572, 301, 42, 36, "imagini/wg.png", false, DXgui.fereastra[1]) guiSetAlpha(DXgui.logowg[1], 0.79) DXgui.copyright[1] = guiCreateLabel(391, 323, 181, 15, "Copyright © România World Gaming - D&G", false, DXgui.fereastra[1]) guiSetFont(DXgui.copyright[1], "default-small") guiLabelSetHorizontalAlign(DXgui.copyright[1], "right", false) guiLabelSetVerticalAlign(DXgui.copyright[1], "center") DXgui.status[1] = guiCreateLabel(4, 85, 606, 145, "Numar Telefon: " .. getElementData(thePlayer, "cellnumber") .. "\nPermis de Conducere: " .. carlicense .. "\nPort Arma: " .. gunlicense .. "\nVehicule (" .. numcars .. "): " .. string.sub(carids, 1, string.len(carids)-2).. "\nProprietati (" .. numproperties .. "): " .. string.sub(properties, 1, string.len("properties")-2) .. "\nOre jucate pe caracter: " .. hoursplayed .. " ora/e\nLimbi Vorbite: " .. table.concat(languages, ", ") .. "\nNumar de Securitate: ".. finalstring .."", false, DXgui.fereastra[1]) local font_0 = guiCreateFont("font/ariblk.ttf") guiSetFont(DXgui.status[1], font_0) DXgui.nume[1] = guiCreateLabel(0, 1, 613, 52, "~-~ ~-~", false, DXgui.fereastra[1]) guiSetFont(DXgui.nume[1], "sa-header") guiLabelSetHorizontalAlign(DXgui.nume[1], "center", false) DXgui.skin[1] = guiCreateStaticImage(143, 241, 92, 87, ":account-system/img/000.png", false, DXgui.fereastra[1]) end ) function menuShow () visableornot = guiGetVisible (DXgui.fereastra[1]) if (visableornot == true) then guiSetVisible (DXgui.fereastra[1], false) showCursor (false) end if (visableornot == false) then guiSetVisible (DXgui.fereastra[1], true) showCursor (true) end end addEvent("showPlayerStats",true) addEventHandler("showPlayerStats",root,menuShow) addEventHandler("onClientGUIClick", root, function() if ( source == DXgui.buton[1] ) then guiSetVisible(DXgui.fereastra[1], false) showCursor(false) end end ) This part was in a server side file saying the info in the chat box. DXgui.status[1] = guiCreateLabel(4, 85, 606, 145, "Numar Telefon: " .. getElementData(thePlayer, "cellnumber") .. "\nPermis de Conducere: " .. carlicense .. "\nPort Arma: " .. gunlicense .. "\nVehicule (" .. numcars .. "): " .. string.sub(carids, 1, string.len(carids)-2).. "\nProprietati (" .. numproperties .. "): " .. string.sub(properties, 1, string.len("properties")-2) .. "\nOre jucate pe caracter: " .. hoursplayed .. " ora/e\nLimbi Vorbite: " .. table.concat(languages, ", ") .. "\nNumar de Securitate: ".. finalstring .."", false, DXgui.fereastra[1])
  14. Thanks! There is a problem, when the resource starts the gui appears. Also when I write the command /stats the gui appears but only the gui, the closing button, the copyright and the logo appears, but he writing (stats) doesn't not appear. Also when I press the closing button, the gui closes but the button doesn't not disappear. DXgui = { fereastra = {}, copyright = {}, linie = {}, nume = {}, status = {}, buton = {}, skin = {}, logowg = {} } addEventHandler("onClientResourceStart", resourceRoot, function() DXgui.buton[1] = guiCreateButton(907, 109, 29, 25, "X", false, DXgui.fereastra[1]) guiSetFont(DXgui.buton[1], "default-bold-small") DXgui.fereastra[1] = guiCreateStaticImage(323, 139, 614, 338, "imagini/fereastra.png", false) guiSetAlpha(DXgui.fereastra[1], 0.80) DXgui.linie[1] = guiCreateStaticImage(0, 53, 613, 3, "imagini/linie.png", false, DXgui.fereastra[1]) guiSetAlpha(DXgui.linie[1], 0.80) DXgui.logowg[1] = guiCreateStaticImage(572, 301, 42, 36, "imagini/wg.png", false, DXgui.fereastra[1]) guiSetAlpha(DXgui.logowg[1], 0.79) DXgui.copyright[1] = guiCreateLabel(391, 323, 181, 15, "Copyright © România World Gaming - D&G", false, DXgui.fereastra[1]) guiSetFont(DXgui.copyright[1], "default-small") guiLabelSetHorizontalAlign(DXgui.copyright[1], "right", false) guiLabelSetVerticalAlign(DXgui.copyright[1], "center") DXgui.status[1] = guiCreateLabel(4, 85, 606, 145, "Numar Telefon: " .. getElementData(thePlayer, "cellnumber") .. "\nPermis de Conducere: " .. carlicense .. "\nPort Arma: " .. gunlicense .. "\nVehicule (" .. numcars .. "): " .. string.sub(carids, 1, string.len(carids)-2).. "\nProprietati (" .. numproperties .. "): " .. string.sub(properties, 1, string.len(properties)-2) .. "\nOre jucate pe caracter: " .. hoursplayed .. " ora/e\nLimbi Vorbite: " .. table.concat(languages, ", ") .. "\nNumar de Securitate: ".. finalstring .."", false, DXgui.fereastra[1]) local font_0 = guiCreateFont("font/ariblk.ttf") guiSetFont(DXgui.status[1], font_0) DXgui.nume[1] = guiCreateLabel(0, 1, 613, 52, "~-~ ~-~", false, DXgui.fereastra[1]) guiSetFont(DXgui.nume[1], "sa-header") guiLabelSetHorizontalAlign(DXgui.nume[1], "center", false) DXgui.skin[1] = guiCreateStaticImage(143, 241, 92, 87, ":account-system/img/000.png", false, DXgui.fereastra[1]) end ) function menuShow () visableornot = guiGetVisible (DXgui.fereastra[1]) if (visableornot == true) then guiSetVisible (DXgui.fereastra[1], false) showCursor (false) end if (visableornot == false) then guiSetVisible (DXgui.fereastra[1], true) showCursor (true) end end addEvent("showPlayerStats",true) addEventHandler("showPlayerStats",root,menuShow) addEventHandler("onClientGUIClick", root, function() if ( source == DXgui.buton[1] ) then guiSetVisible(DXgui.fereastra[1], false) showCursor(false) end end ) Also when I start the resource I get this erros: ERROR: chat\c_stats.lua:28 bad argument #1 to 'len' (string expected, got nil)
  15. Hey, I just made a window and I need to open it when I trigger a command in server side. function menuShow () visableornot = guiGetVisible (DXgui.fereastra[1]) if (visableornot == true) then guiSetVisible (DXgui.fereastra[1], false) showCursor (false) end if (visableornot == false) then guiSetVisible (DXgui.fereastra[1], true) showCursor (true) end end I know I need to use triggerClientEvent but I don't know how to make the line...
  16. Well, I knew that already, that they DRAW an image with pixels, but anyway, I used a static image as background and I just set its alpha. Thanks for help anyway!
  17. Ok ok, all u did is to confuse me.. I call them DX elements because there is more then one thing in this (rectangle, text, image, line) And the only thing I need is to hide those DX things.
  18. ..:D&G:..

    Paintjob TXD

    Hey, I just downloaded a car mod for my server, and it contains the mod and 4 paintjobs, fletzer1.txd, fletzer2.txd, etc.. How do I apply the paint job?
  19. What shoud the ''source'' be for guiSetVisible? As there are dx elemts and not a main gui
  20. I will try with the button. I use this code to close the button, but I can't use guiSetVisible as the is no gui... addEventHandler("onClientGUIClick", root, function() if ( source == dxGui.button[1] ) then --guiSetVisible( , false) showCursor(false) end end ) ------------------------EDITED------------------------ This is what I did till now: dxGui = { button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() dxGui.button[1] = guiCreateButton(874, 446, 26, 25, "X", false) guiSetAlpha(dxGui.button[1], 0.42) guiSetFont(dxGui.button[1], "default-bold-small") guiSetProperty(dxGui.button[1], "NormalTextColour", "FFFFFFFF") end ) addEventHandler("onClientRender", root, function() dxDrawRectangle(407, 161, 498, 314, tocolor(0, 0, 0, 208), false) dxDrawText("Numar Telefon: " .. getElementData(thePlayer, "cellnumber") .. "\nPermis de Conducere: " .. carlicense .. "\nPort Armă: " .. gunlicense .. "\nVehicule (" .. numcars .. "): " .. string.sub(carids, 1, string.len(carids)-2).. "\nProprietății (" .. numproperties .. "): " .. string.sub(properties, 1, string.len(properties)-2) .. "\nOre jucate pe caracter: " .. hoursplayed .. " oră/e\nLimbi Vorbite: " .. table.concat(languages, ", ") .. "\nSocial Security Numar: ".. finalstring .."\n\n\n Nume: " .. getPlayerName(thePlayer) .. "", 414, 226, 654, 378, tocolor(255, 255, 255, 255), 1.30, "clear", "left", "top", false, false, true, false, false) dxDrawLine(408, 206, 904, 206, tocolor(255, 255, 255, 255), 2, true) dxDrawText("~-~-~-~-~" .. getPlayerName(thePlayer) .. "~-~-~-~-~", 525, 172, 806, 194, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "left", "top", false, false, true, false, false) dxDrawImage(416, 386, 86, 78, ":skins/img/000.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end ) addEventHandler("onClientGUIClick", root, function() if ( source == dxGui.button[1] ) then --guiSetVisible( , false) showCursor(false) end end )
  21. Too hard to make, and I just started using DX, I think I will use a button
  22. Well this should be my button: dxDrawRectangle(876, 444, 28, 27, tocolor(0, 0, 0, 255), true) dxDrawText("X", 879, 442, 900, 466, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) But how do I make it a button, what fuctions do I need to use? God, I didn't know how hard it is to make just a small simple button in dx
  23. Well, this is what I did for now: addEventHandler("onClientRender", root, function showPlayerStats() dxDrawRectangle(408, 159, 498, 314, tocolor(0, 0, 0, 208), true) dxDrawText("Numar Telefon: " .. getElementData(thePlayer, "cellnumber") .. "\nPermis de Conducere: " .. carlicense .. "\nPort Armă: " .. gunlicense .. "\nVehicule (" .. numcars .. "): " .. string.sub(carids, 1, string.len(carids)-2).. "\nProprietății (" .. numproperties .. "): " .. string.sub(properties, 1, string.len(properties)-2) .. "\nOre jucate pe caracter: " .. hoursplayed .. " oră/e\nLimbi Vorbite: " .. table.concat(languages, ", ") .. "\nSocial Security Numar: ".. finalstring .."", 414, 226, 654, 378, tocolor(255, 255, 255, 255), 1.30, "clear", "left", "top", false, false, true, false, false) dxDrawLine(408, 206, 904, 206, tocolor(255, 255, 255, 255), 2, true) dxDrawText("~-~-~-~-~" .. getPlayerName(thePlayer) .. "~-~-~-~-~", 516, 172, 797, 194, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "left", "top", false, false, true, false, false) dxDrawImage(730, 252, 118, 107, ":skins/img/000.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawRectangle(876, 444, 28, 27, tocolor(0, 0, 0, 255), true) dxDrawRectangle(875, 443, 28, 27, tocolor(0, 0, 0, 247), true) dxDrawText("X", 879, 442, 900, 466, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end ) And the button should be this, I think...: dxDrawRectangle(876, 444, 28, 27, tocolor(0, 0, 0, 255), true) dxDrawRectangle(875, 443, 28, 27, tocolor(0, 0, 0, 247), true) dxDrawText("X", 879, 442, 900, 466, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) And what should the button be, the text or the rectangle itself? What is the easier way, I don't want to use a button cause I want the gui to be 100% dx drawn
  24. Hey, is the first time I used Dx draw elements to make a guy, and I need a bit of help. I made a guy which contains dxDrawRectangle, dxDrawText, dxDrawLine and dxDrawImage. How do I conect this elemts together, like a normal GUI, so I can use this dx drawn button: dxDrawText("X", 879, 442, 900, 466, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) to close the dx drawn GUI? (all elements at once)
  25. Hey, I was looking for a good compiler that does not requires updates and does not affect the script. I saw some scripts saying LuaQ. If someone knows a good compiler please let me know
×
×
  • Create New...