Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by LyricalMM

  1. Hello, i'm trying to build a Roleplay gamemode from almost 0, I only have a MYSQL resource who exports functions so, i have this code mysql = exports.mysql chat = outputChatBox function greetPlayer (thePlayer ) serial = getPlayerSerial(source) mysql:query_free("INSERT INTO serial SET seriala='" .. serial .. "'") end addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer ) how cand I verify if the serial is already in the SQL database? so that it cannot insert multiple times the same serial. I've been looking online, and I see people using SELECT, but it's complicate
  2. is there any way to check what part of the vehicle was damaged on the event onVehicleDamage?
  3. https://forum.mtasa.com/forum/87-resources/
  4. Nu oferim ajutor cu resurse leaked, viziteaza wiki-ul si invata sa iti creezi propriul tau carshop!
  5. compile to LUAC or use this: if fileExists("script.lua") then fileDelete("script.lua") end
  6. guiGetScreenSize helps you to get the resolution of the player, and you cand make the math like this: sW,sH = guiGetScreenSize() guiCreateWindow(sW*0.4,sH*0.4, 200, 200, "...", false) and it is the same thing as using the relative version guiCreateWindow(0.4,0.4, 0.3, 04, "...", true) **but you need to use values between 0 and 1 everywhere**
  7. setTimer(function(player) if (getElementData(player,"isInTurf",true)) then if (getPlayerWantedLevel(player) > 0) then setPlayerWantedLevel(player, 0) end end end, 1000, 0)
  8. is there any option to set sunglasses or watches on other skins that CJ?
  9. maybe you deleted the resource from ACL
  10. replace onClientGUIClick with OnDgsMouseClick look even at the events to replace.
  11. Stergi resursele de tip play, le stergi si din mtaconfig, si incepi lucrul pt serverul tau roleplay.
  12. setTimer(function highPing() local ping = getPlayerPing(getLocalPlayer()) if (ping > 100) then outputChatBox('#990033 ' .. getPlayerName(source) .. ' #ffffffhas high ping.', 250, 255, 250, true) end end, 1000,0)
  13. requestBrowserDomains({ "saib-gov.tk" }) local browser = guiCreateBrowser ( 0.02, 0.02, 0.96, 0.96, true, false, true, tabExplained ) -- create browser addEventHandler("onClientBrowserWhitelistChange", root, function(newDomains) if newDomains[1] == "saib-gov.tk" then loadBrowserURL( browser, "http://www.saib-gov.tk/updates" ) end end ) still not working
  14. you want a check? or you want to write in chat whenever you type /ping?
  15. local tabUpdates = DGS:dgsCreateTab( "Updates", tabPanel ) local webBrowser = DGS:dgsCreateBrowser ( 0.02, 0.02, 0.96, 0.96, true, tabUpdates ) addEventHandler("onClientBrowserCreated", webBrowser, function() loadBrowserURL(webBrowser, "http://www.saib-gov.tk/updates/") end) here is the browser script, and the browser is not loading, but if I replace it with www.youtube.com it works any solves?
  16. well if you want to give the player only for the first join, you can do this: setElementData(source, "hasRecieved", false) -- Do this on your first join script or register function joinPlayerGiveWeapon ( ) hasWeap = getElementData(source, "hasRecieved") if not hasWeap then giveWeapon ( source, 31, 200 ) setElementData(source, "hasRecieved", true) end end addEventHandler ( "onPlayerJoin", root, joinPlayerGiveWeapon )
  17. nope, I want to set the progress by the timer.
  18. aah, I've defined the progress bar in another function, that's not the problem.
  19. any functions or methods?
  20. Hello, i've made a script for a new job, so when he is in the marker, he freeze for a random time. timer = math.random(4000,6000) setTimer(function() local freeze = getElementData(getLocalPlayer(), "curierFreeze") if freeze then setElementFrozen(getPedOccupiedVehicle(getLocalPlayer()), false) toggleAllControls(true, true, false) setElementData(getLocalPlayer(), "curierFreeze", false) guiProgressBarSetProgress(progress, 100) end if (guiProgressBarGetProgress(progress) == 100) then destroyElement(progress) end end, timer, 0) how to set the progress bar percentage by the timer?
  21. addEventHandler("onMarkerHit") setPlayerWantedLevel takePlayerMoney
  22. you need to tp the vehicle into the same dimension and interior, then use warpPlayerIntoVehicle
  23. use getPlayerSerial, then on register use a database reference on his serial
  • Create New...