Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 14/02/18 in Posts

  1. السلام عليكم ورحمة الله وبركاته أقدم اليوم إعتزالي التام, وتشرفت بمعرفتكم جميعاً رسالة إلى كل شخص غلطت عليه.. أعذرني 2012 - 2018 أخوكم / خالد
    1 point
  2. Te recomiendo crear tu propia zona anti zombis usando las funciones onElementColShapeHit onElementColShapeLeave toggleControl getElementData
    1 point
  3. The only way you could do it is addDebugHook, but it may degrade script performance.
    1 point
  4. That is basically an inline-if statement based on ternary operators (similar to : ? in many other languages including PHP, C, C++, etc) See more: https://en.wikipedia.org/wiki/%3F:, https://en.wikipedia.org/wiki/%3F:#Lua Here's my attempt at explaining it: AND: If the left operand is a logical true, and returns the RIGHT operand. If the left operand is a logical false, and returns the LEFT operand. OR: If the left operand is a logical true, or returns the LEFT operand. If the left operand is a logical false, or returns the RIGHT operand. Following these laws, the statement is executed in this way: where itemTable does equal "large": itemTable[i] == "large" evaluates true; true and lW -- left operand evaluates into a logical true, and therefore and returns the right operand, lW; lW or sW -- left operand evaluates into a logical true, and therefore or returns the left operand, lW; -- The result of this evaluation is lW. where itemTable does NOT equal "large": itemTable[i] == "large" --evaluates false; false and lW -- left operand evaluates into a logical false, and therefore and returns the left operand, false; false or sW -- left operand evaluates into a logical false, and therefore or returns the right operand, sW; --The result of this evaluation is sW. Basically, function iif(a, b, c) return a and b or c end --equivalent to function iif(a, b, c) if a then return b else return c end end returns b if a is true, otherwise c.
    1 point
  5. local sX, sY = guiGetScreenSize() local bgW, bgH = 390, 675 -- Background item size local bgX, bgY = (sX-bgW)/2, (sY-bgH)/2 -- Background pos local lW = 160 -- Large item width local sW = 80 -- Small item width local itemTable = { "large", "large", "large", "small", "small", "small", "small" } function drawItems() dxDrawImage(bgX, bgY, bgW, bgH, "background.png") local offsetX, offsetY = 30, 30 for i = 1, #itemTable do outputChatBox("i: " .. i .. " X: " .. offsetX .. " Y: " .. offsetY) if bgW - offsetX < (itemTable[i] == "large" and lW or sW) then offsetX = 30 offsetY = offsetY + 90 end dxDrawImage(bgX+offsetX, bgY+offsetY, itemTable[i] == "large" and lW or sW, 80, itemTable[i] .. "item.png") offsetX = offsetX + (itemTable[i] == "large" and lW or sW)+10 end end addEventHandler("onClientRender", root, drawItems) Try to understand the code. If you have issues, feel free to reply.
    1 point
  6. Hey guys! Good news! DGS Version 3.3 has been released with media browser! What is media browser???? media browser is a browser but I coded it which can play videos and audios easily (Ah... Only local mode, sry for that) But ! We can play video with only 5 line codes ! DGS = exports.dgs browser = DGS:dgsCreateMediaBrowser(600,600) --[[Create a media browser ( CEF browser with my api )]] img = DGS:dgsCreateImage(400,200,600,600,browser,false) --[[Create an image because media browser is a browser ( hmm... it is a kind of texture ) ]] DGS:dgsMediaLoadMedia(browser,"test.webm","VIDEO") -- [[Give a video file ( Local video and only support .webm file for video and .ogg file for audio)]] DGS:dgsMediaPlay(browser) --[[Now ! Let's get Higher!]]
    1 point
  7. Прикольно. Не было мыслей создать свой канал на ютубчике и пилить там скринкасты? Так бы ты помог большему количеству людей.
    1 point
  8. function isAccountExists(serialToCheck) local data = executeSQLQuery("SELECT * FROM hesaplar") if type(data) == "table" and #data ~= 0 then for k,v in ipairs(data) do if v.serial == serialToCheck then return true end end end return false end function PlayerLogin(username,password,checksave) if not (username == "") then if not (password == "") then local account = getAccount ( username, password ) local ip = getPlayerIP(source) local serial = getPlayerSerial(source) if ( account ~= false ) then logIn(source, account, password) local banka = exports.banking:getPlayerBankBalance(source) if not isAccountExists(serial) then executeSQLQuery("INSERT INTO hesaplar(ip,serial,id,sifre,banka) VALUES(?,?,?,?,?)", ip, serial, username, password,banka) else executeSQLQuery("UPDATE hesaplar SET id=?,sifre=?,banka=? WHERE serial=?",username,password,banka,serial) end triggerClientEvent (source,"hideLoginWindow",getRootElement()) triggerEvent("onPlayerLogIn", source) triggerClientEvent(source,"onPlayerLoginSuccess", source) setElementData(source,"loggedIn", true) setElementData(source,"username", getAccountName(account)) setElementData(source, "gang", getAccountData(account, "gang")) local realTime = getRealTime() local month = tostring(realTime.month + 1) local monthday = tostring(realTime.monthday) if #month == 1 then month = "0" .. month end if #monthday == 1 then monthday = "0" .. monthday end local timestamp = realTime.year + 1900 .. "-" .. month .. "-" .. monthday setAccountData(account, "lastlogin", timestamp) if checksave == true then triggerClientEvent(source,"saveLoginToXML",getRootElement(),username,password) else triggerClientEvent(source,"resetSaveXML",getRootElement(),username,password) end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Hatalı Kullanıcı adı / şifre!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Lütfen Şifreni Gir!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Lütfen Kullanıcı Adını Gir!") end end addEvent("onRequestLogin",true) addEventHandler("onRequestLogin",getRootElement(),PlayerLogin) Try this
    1 point
  9. انا بكتب بشرعة فالكيوبرد لهذا مافهمت شيئ ._.
    1 point
  10. تزيد على الداتا نقطة يعني الداتا عندك 3 وسويت الحركة هذي بيصير الداتا عندك 4
    1 point
  11. هل تلمح لخروجك قريباً؟ وعليكم السلام ورحمه الله وبركاته, عادي انا عاذرك من زمان ومتشرف بمعرفتك أيضاً وتركت بصمة في تاريخ البرمجة الأم تي أيهييه وسويت مذهولات أثارتنا وأدهشتنا شكراً لك! ووداعاً ي صديقي من هذا العالم!
    1 point
  12. Hello, There are you: exports.scoreboard:scoreboardAddColumn( "Wanted", 45 ) exports.scoreboard:scoreboardAddColumn( "Money", 55 ) function ScoreBoardWanted( DataName ) if ( DataName == "Wanted" ) or ( DataName == "Money" ) then if ( getElementType( source ) == "player" ) then setElementData ( source, "Wanted", getPlayerWantedLevel ( ) ) setElementData ( source, "Money", getPlayerMoney ( ) ) end end end addEventHandler("onClientElementDataChange", getRootElement(), ScoreBoardWanted) If that helps you tell me! or put thanks to make it easier.
    1 point
  13. local x = math.random(-3000,3000) local y = math.random(-3000,3000) local z = math.random (1000,10000)
    1 point
  14. تشرفت بمعرفتك , وإكتسبت منك الخبرة الجيدة موفق في حياتك
    1 point
  15. وداعا واتمني لك التوفيق في مستقبلك وحياتك ولابد من طريق الرحيل لنا جميعا
    1 point
  16. To donwpsi Бескомпромиссная термоядерная аннигиляция пожарной части: for i=550,20000 do removeWorldModel(i,100,-2000,100,0) end Тут не устоит не только пожарка, но и даже вокзалу конец!
    1 point
  17. @KroplaBezKitu Please download and run MTADiag and follow the instructions. Press 'y' when asked to allow making changes, and 'n' when otherwise asked to. Post any Pastebin URL MTADiag gives you in this topic.
    1 point
  18. Salut, am nevoie de niște sugestii. Vreau să deschid un server, dar nu știu mai exact de ce. M-am gândit la ceva asemănător Euro Truck Simulator, dar meh. Mai aștept sugestii, poate primesc ceva interesant. FĂRĂ ROLEPLAY / FREEROAM / RACE / DAYZ
    1 point
  19. asta ar fii una dintre glume
    1 point
  20. daca tu vrei sa faci /roleplay avansat/ si un server de durata, nefacut pentru bani *oricum asa mintiti mai toti*, nu trebuie sa-ti iei persoane random si sa le pui in cap la administrare. Proiecte de genul se fac cu persoane in care poti sa-ti pui baza, si-ti dai seama ca stiu ei ce stiu, persoane care le cunosti de mult, adevarati prieteni. Asa poti sa rupi relatia de prietenie usor printr-un ' nu-mi convine asta, te las, hai pa bafta ' si pac delete la tot. Desigur, nu numai sa le cunosti de mult, ci va trebuii si sa te poti baza pe ele cu adevarat, nu sa fie aiurea si sa te 'skameze'. @.Dan se simte.
    1 point
×
×
  • Create New...