Jump to content

..:D&G:..

Members
  • Posts

    1,028
  • Joined

  • Last visited

  • Days Won

    1

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

  1. Would you all give this post a break already?! There is not even voting going on here, there's about 4 people and all of them want to be moderators, so just go do something else till the MTA Staff decide what to do. There is no even need of a moderator but meh, what do I know
  2. Listen my child. I know you are young and full of energy and very enthusiastic about leading a flock of sheep, but first you need to show that you are capable of doing this, you need to first have a lot of experience before getting a job. As in reall life, you can't get hope for something without working for it. Take me, Tekken and Seek as an example. We have gamemods, scripts and maps done by us, we know how things go around here, you my child, you just had a little taste of the real world. All the best my little padawan.
  3. Did anyone even ask me if I'm still here?
  4. Si blestemul meu inca dainuie prin MTA-ul romanesc
  5. Pentru Petrutz al nostru? Sa imi trimita prin posta mana lui dreapta si gm-ul e al lui
  6. :) 20 de euro?? Da e script sau tot GM-UL? Pentru Petru al nostru, doar scriptul
  7. Pe scurt Petrule, vrei scriptul meu cu moduri? )) 20 de euro si e al tau, poti platii paypal sau skinuri cs Cu tot cu moduri
  8. Bai rasule, la 20 si ceva de ani inca te mai joci jocul care il jucai cand aveai 13 ani )) Nu ai trecut mai departe in plm... Te laudai ca te duci in danemarca sa faci 900 de euro pe saptamana cum ziceai tu sa iti iei dedicat, dar stai pe spatele lu' fractu' si cauti si tu job-uri mici si grele de traducere sau cine stie ce plm pe net pentru 1-2 euro... Dute frate fa un curs, cauta ceva de munca, fa-ti o familie, in pula mea acum serios ai trecut de majorat -.- Oricum lumea nu mai da 2 bani pe tine si tu iei un joc pentru copii in serios... Oricum, mereu cand te vad, rad cu gura pana la urechi ))) Esti un exemplu de esec, la care ma uit mereu si imi pun ambitia sa nu ajung ca tine
  9. Pai view-urile se pun si daca aceeasi persoana intra pe topic, se tot pun view-urile. Deci daca acei 4 persoane intra de 10 ori pe topic, se pun ca 40 de view-uri
  10. Atunci hai ca te invata tata niste chestii. In primul rand, am vazut ca ai prostul obicei sa tot postezi un nou "Reply" la fiecare chestie pe care vrei sa o zici. Asta se numeste "double post", am vazut ca tu postezi si de 3 ori consecutiv Daca cineva nu a postat ceva dupa postarea ta la topic, tu trebuie sa editezi ultimul tau post nu sa postezi din nou. Alta chestie e ca nu se uita nimeni pe forumul asta, doar 3-4 oameni si acei oameni au serverele lor si nu cred ca sunt prea interesati. O alta chestie ar fi sa nu mai pui atatea spatii si culori ca nu suntem la gradinita, plus ca pe mine ma dor ochii cand iti vad topicul.
  11. M-am pisat pe mine de ras cand am citit asta =))))) Nici in actele de mare importanta nu am vazut asa ceva =))) Tu iti dai seama ca MTA-ul e doar un joc nu? Si tu vrei sa imi spui mie ca ai vorbit cu cei de la MTA sa te lase sa folosesti acel nume? Ma indoiesc ca ii doare pe ei undeva ce nume pui tu la server. Si cum vine asta, prima oara zici ca serverul se numeste MTA:Racers Land dupa incepi sa indrugi ceva legat de MTA:RP care e cu totul alta chestie, plus ca numele este deja luat de ceva ani buni... Tu ori te crezi prea matur, ori nu sti ce-i cu viata ta si care e diferenta dintre viata virtuala si cea reala, sau tu pur si simplu esti dus cu capul.
  12. Ceva de genu' local window = guiCreateWindow(0, 0, 0.5, 0.4, "Asta ar fi panoul", true); local open = false; bindKey("F1", "down", function() if (open == false) then guiSetVisible(window, true); open = true; else guiSetVisible(window, false); open = false; end end); Mulțumesc , dar cum adaug conținut ? Mă refer la : am panoul , scriptul panoului , dar nu știu cum să-l adaug în acesta . Cum fac? https://community.multitheftauto.com/index.php?p ... ils&id=141
  13. ..:D&G:..

    Unire.

    Bai omule, tu chiar nu realizezi ca aproape toti ownerii de server nu stiu scripting si vor donatii? Fiecare vrea sa fie mare boss la el acasa. Si sti doar ca romanul fura, daca toti se unesc, doar 1 sau 2 vor face treaba, restul stau, se uita si descarca frumos arhiva cu gamemod-ul si se duc sa isi deschida un server. Deci, eu te-asi sfatuii sa nu mai dezgropi mortii si sa lasi sectiunea romaneasca ingropata, nu ii mai fa vesnica pomerine ca nu are nevoie
  14. A file with external links: https://community.multitheftauto.com/index.php?p ... s&id=13268 DONE
  15. Hi guys, so I am starting to use dx drawn windows, but it's too much code in the script for a small window, so I want to make a script which keeps the main code of the window, and I want to be able to only call a function and create a window from this scripts, instead of having to write a new piece of code for another window, something like mabako's "gui" resource from MTA Paradise. So here is the main window code: function drawWindow(x, y, width, height, winName) dxDrawLine(751 - 1, 264 - 1, 751 - 1, 656, tocolor(254, 254, 254, 254), 1, false) dxDrawLine(1262, 264 - 1, 751 - 1, 264 - 1, tocolor(254, 254, 254, 254), 1, false) dxDrawLine(751 - 1, 656, 1262, 656, tocolor(254, 254, 254, 254), 1, false) dxDrawLine(1262, 656, 1262, 264 - 1, tocolor(254, 254, 254, 254), 1, false) dxDrawRectangle(751, 264, 511, 392, tocolor(0, 0, 0, 180), false) dxDrawLine(751 - 1, 264 - 1, 751 - 1, 288, tocolor(254, 254, 254, 254), 1, false) dxDrawLine(1262, 264 - 1, 751 - 1, 264 - 1, tocolor(254, 254, 254, 254), 1, false) dxDrawLine(751 - 1, 288, 1262, 288, tocolor(254, 254, 254, 254), 1, false) dxDrawLine(1262, 288, 1262, 264 - 1, tocolor(254, 254, 254, 254), 1, false) dxDrawRectangle(751, 264, 511, 24, tocolor(75, 2, 130, 254), false) dxDrawText(winName, 775 - 1, 262 - 1, 1217 - 1, 288 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText(winName, 775 + 1, 262 - 1, 1217 + 1, 288 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText(winName, 775 - 1, 262 + 1, 1217 - 1, 288 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText(winName, 775 + 1, 262 + 1, 1217 + 1, 288 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText(winName, 775, 262, 1217, 288, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("X", 1217 - 1, 263 - 1, 1262 - 1, 288 - 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("X", 1217 + 1, 263 - 1, 1262 + 1, 288 - 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("X", 1217 - 1, 263 + 1, 1262 - 1, 288 + 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("X", 1217 + 1, 263 + 1, 1262 + 1, 288 + 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("X", 1217, 263, 1262, 288, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) end This is how it looks like: I have no idea how to do this... so, any ideas? Thanks.
  16. Lol, after I read your post, I noticed that I didn't use showCursor when opening the window, as I have an external script which shows the cursor when I press M, but after adding showCursor to the window, it works Thanks!
  17. [quote name=..&G:..] local s = {guiGetScreenSize()} function renderCmdsPanel() textFont2 = 1.30/1920*s[1] textFont = 1.00/1920*s[1] local r, g, b = exports.gui:getPlayerBaseColor(getLocalPlayer()) dxDrawText("X", s[1]*(1265 - 1)/1920, s[2]*(239 - 1)/1080, s[1]*(1318 - 1)/1920, s[2]*(260 - 1)/1080, tocolor(0, 0, 0, 255), textFont, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("X", s[1]*(1265 + 1)/1920, s[2]*(239 - 1)/1080, s[1]*(1318 + 1)/1920, s[2]*(260 - 1)/1080, tocolor(0, 0, 0, 255), textFont, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("X", s[1]*(1265 - 1)/1920, s[2]*(239 + 1)/1080, s[1]*(1318 - 1)/1920, s[2]*(260 + 1)/1080, tocolor(0, 0, 0, 255), textFont, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("X", s[1]*(1265 + 1)/1920, s[2]*(239 + 1)/1080, s[1]*(1318 + 1)/1920, s[2]*(260 + 1)/1080, tocolor(0, 0, 0, 255), textFont, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("X", s[1]*1265/1920, s[2]*239/1080, s[1]*1318/1920, s[2]*260/1080, tocolor(255, 255, 255, 255), textFont, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Welcome to the commands panel!", s[1]*574/1920, s[2]*271/1080, s[1]*1243/1920, s[2]*318/1080, tocolor(255, 255, 255, 255), textFont2, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Commands Panel", s[1]*849/1920, s[2]*239/1080, s[1]*969/1920, s[2]*261/1080, tocolor(255, 255, 255, 255), textFont, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("© World Gaming", s[1]*497/1920, s[2]*239/1080, s[1]*665/1920, s[2]*261/1080, tocolor(255, 255, 255, 255), textFont, "default", "center", "center", false, false, false, false, false) end function closeXButton(button, state) local xButton = isCursorOverText(s[1]*1265/1920, s[2]*239/1080, s[1]*1318/1920, s[2]*260/1080) if (button == "left" and state == "down" and xButton) then guiSetVisible(tabPanel, false) showCursor (false) guiSetInputEnabled(false) tabPanel = nil removeEventHandler("onClientRender", getRootElement(), renderCmdsPanel) removeEventHandler("onClientClick", getRootElement(), closeXButton) end end function commandsHelp() local loggedIn = getElementData(sourcePlayer, "loggedin") if (loggedIn == 1) then guiSetInputEnabled(true) addEventHandler("onClientRender", getRootElement(), renderCmdsPanel) addEventHandler("onClientClick", getRootElement(), closeXButton) ............. This IS the complete code. The bit with dots is just a gridlist ...
  18. That was just the main things I have in the code, but it goes like this: function closeXButton(button, state) local xButton = isCursorOverText(s[1]*1265/1920, s[2]*239/1080, s[1]*1318/1920, s[2]*260/1080) if (button == "left" and state == "down" and xButton) then guiSetVisible(tabPanel, false) showCursor (false) guiSetInputEnabled(false) tabPanel = nil removeEventHandler("onClientRender", getRootElement(), renderCmdsPanel) removeEventHandler("onClientClick", getRootElement(), closeXButton) end end function commandsHelp() local loggedIn = getElementData(sourcePlayer, "loggedin") if (loggedIn == 1) then guiSetInputEnabled(true) addEventHandler("onClientRender", getRootElement(), renderCmdsPanel) addEventHandler("onClientClick", getRootElement(), closeXButton) ............. So I don't think that would be the problem.
  19. So I made this dx window and I've drawn an "X" to be used as a button to close the window. function isCursorOverText(posX, posY, sizeX, sizeY) if(isCursorShowing()) then local cX, cY = getCursorPosition() local screenWidth, screenHeight = guiGetScreenSize() local cX, cY = (cX*screenWidth), (cY*screenHeight) if(cX >= posX and cX <= posX+(sizeX - posX)) and (cY >= posY and cY <= posY+(sizeY - posY)) then return true else return false end else return false end end function renderCmdsPanel() dxDrawText("X", s[1]*1265/1920, s[2]*239/1080, s[1]*1318/1920, s[2]*260/1080, tocolor(255, 255, 255, 255), textFont, "bankgothic", "center", "center", false, false, false, false, false) end addEventHandler("onClientRender", getRootElement(), renderCmdsPanel) addEventHandler("onClientClick", getRootElement(), closeXButton) function closeXButton(button, state) local xButton = isCursorOverText(s[1]*1265/1920, s[2]*239/1080, s[1]*1318/1920, s[2]*260/1080) if (button == "left" and state == "down" and xButton) then guiSetVisible(tabPanel, false) showCursor (false) guiSetInputEnabled(false) tabPanel = nil removeEventHandler("onClientRender", getRootElement(), renderCmdsPanel) removeEventHandler("onClientClick", getRootElement(), closeXButton) end end I've used the same method for for my other windows and it works, but here, it only works when I have gui editor active, as if the "onClientClick" event is triggered only when in guieditor... Any ideas? Thanks.
  20. dbConnect( "sqlite", "file.db" ) Don't forget to create a .db file in the script.
  21. Hi guys, is there a way to make the gui property ImageColours into RGB? It seems to be using hex colours, but I need it to use RGB colours... guiSetProperty(bUpdate, "ImageColours", "tl:FF93007C tr:FF93007C bl:FF93007C br:FF93007C") Any ideas? Thanks.
  22. I used JSON for this and it works now.
  23. So I saved some RGB color codes as an element data to each player like this: setElementData(thePlayer, "color", "255, 255, 255"). How can I unpack that and use it in "tocolor" in a dxDrawRectangle? I can't unpack that because it is a string... Any ideas? Thanks.
  24. ..:D&G:..

    problem

    This if not v == localPlayer then is not the same as this if not v == localPlayer then return end This will loop though all the players in a random order (I think): for k,v in ipairs(getElementsByType("player")) do So this: if not v == localPlayer then will be called every time the function gets to a player from the table, so if you have "return" in there and the function gets to you (the localPlayer) will stop the function therefore stopping the loop. Also: [quote name=..&G:..]When the script gets to you when it loops through the table, it will stop, and will not carry on to the other players, and you don't really need a "return" for this function.
  25. ..:D&G:..

    problem

    It's not the same, you used this: if not v == localPlayer then return end and I used: if v == localPlayer then return end Also, use this: addEventHandler("onClientRender", getRootElement(), function () for k,v in ipairs(getElementsByType("player")) do if getPlayerTeam(v) == getTeamFromName("Military") then if not v == localPlayer then dxDrawTextOnElement(v,"Army",1,20,0,255,0,255,1,"bankgothic") end end end) Because when the script gets to you when it loops through the table, it will stop, and will not carry on to the other players, and you don't really need a "return" for this function.
×
×
  • Create New...