Jump to content

Turbe$Z

Members
  • Posts

    439
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Turbe$Z

  1. umm this is works with all outputs. but if an output is for only local player on the server side, it will not appear to everyone? or the opposite, if a output for everyone, it will not show only for local player?
  2. hey, i made a custom chat script, and i want to output every message to that, and i found this event, but does not work... i tried it this way: function onChatMessageHandler(theMessage, thePlayer) --outputChatBox(theMessage) triggerClientEvent(root,"chat->NewMessage",root,false,theMessage) end addEventHandler("onChatMessage", root, onChatMessageHandler) what wrong, or how to use? there is no errors or warnings, simply just does not trigger the client event
  3. You mean this? ALTER TABLE `interiors` CHANGE `megujitva` `megujitva` TIMESTAMP(6) on update CURRENT_TIMESTAMP(6) NOT NULL DEFAULT 'current_timestamp(6)'; Sorry this is my first time using MySQL
  4. I have this line: dbExec(connection,"UPDATE interiors SET megujitva = ? WHERE id = ?",getTimestamp(),idd) And the funny thing is, in the same script and same function, this is works good, i get the correct date data. But when i try in another function in the same script, i get 0000-00-00 00:00:00. Why? What the difference, cause i copied exactly the same code part (which is working) to the another function, and i got only zeros!? I dont understand... how to fix this?
  5. I want to get a data from all accounts on the server, but i get this warning: 'getAccount' [Expected string at argument 1, got account] 'getAccountData' [Expected account at argument 1, got boolean] this is my code: for i, v in pairs(getAccounts()) do names = getAccountData(getAccount(v), "acc:nickname") end outputChatBox(names) What wrong?
  6. i send datas from server side to client side then insert these datas to a table, and i want to render it, but the render does not work, cause the loop is does not working, and i dont know why, what wrong with the loop? this is my code: local playerVehicles = {} local sx, sy = guiGetScreenSize() function vehicles() for k, veh in pairs(playerVehicles) do dxDrawText(veh[k][1].." | "..veh[k][2], sx/2-370,sy/2-297,sx/2,sy/2, tocolor(255, 255, 255, 220), 3, "default-bold", "left", "top", false, false, false, true ) end end addEventHandler("onClientRender",root,vehicles) function teszt(p,id,model) table.insert(playerVehicles,{id,model}) end addEvent("test",true) addEventHandler("test",root,teszt)
  7. Hello, i want to make a vertical progress bar which comes from bottom to top, but whatever i do it show like this: it comes from top to bottom... but i want something like this: this is the code of the rectangle: dxDrawRectangle(moveX-20, moveY+5, 30, math.ceil(itemWeight)/getTypeOfElement(elementSource)[3]*290,tocolor(172, 211, 115,200)) Anyone can help me? I tried so many ways but none of them worked...
  8. Some people use this, and i see they use discord RPC with MTA, but this does not available in official version of MTA. So, where can i download the dev version?
  9. i use browser, but that's not good, because cannot play copyrighted music :s
  10. i tried all youtube music players scripts from community, but none of them work
  11. Anyone can send me a working yt mp3 converter API? Or how to create one, to play music from youtube on my server?
  12. I created a youtube player, and i want to remove the event handler, when the music ends, but i dont know how to get the song length from web browser... anyone can help?
  13. oh i got it, then my machine is not faulty.. ? thank you!
  14. I just start the client, i'm not joining to any server when the CPU usage go up to 20-30%
  15. When i start MTA client, the CPU usage go up to 30-35% usage from 5-10%, and then 5-10 mins later decrease back the usage to 5-10%. It's annoying me, because the CPU temp go up to 50C°-60C° too from 30C°-45C°... What's this? My config (if important): Intel Core i5-9600K 2x8GB RAM GTX 1080
  16. I want create a HUD with image progress bars. I think i need dxDrawImageSection, but i don't know how to use this for a progress bar. Anyone can give me a example of this progress bar with imagesection?
  17. i removed the showCursors from the freeroam script
  18. When a player create car with the freeroam panel, the cursor does not disappear, i removed all showCursor from the script, and the players show the cursor with another script, when press M, but the cursor does not disappear too.. then how can i fix this bug?
  19. if key == 'backspace' and ePress then chat.input = string.sub(chat.input, 0, string.len(chat.input) - 1) end The backspace working with default characters (a,b,c,d...), but when i type a special character, for example: á, é, ű, ő, ü...etc., the backspace not working, what wrong?
  20. This is the code: local now = getTickCount() local x,y = interpolateBetween(one, one1, 0, two, two1, 0, (now - start) / ((start + 2500) - start), "Linear") local now2 = getTickCount() local x2,y2 = interpolateBetween(asd, asd1, 0, fgh, fgh1, 0, (now2 - start2) / ((start2 +2500) - start2), "Linear") if right == false then dxDrawRectangle(x, (sy_/2-20) * ym, 3* xm, 40 * ym,tocolor(255,255,255,255)) else dxDrawRectangle(x2, (sy_/2-20) * ym, 3* xm, 40 * ym,tocolor(255,255,255,255)) end -- if x >= 1063 and x <= 1073 and right == false then test = true elseif x >= 1089 and x <= 1099 and right == false then test = true elseif x >= 1158 and x <= 1172 and right == false then test = true elseif x >= 1212 and x <= 1232 and right == false then test = true elseif x >= 1276 and x <= 1293 and right == false then test = true elseif x >= 1423 and x <= 1433 and right == false then test = true elseif x >= 1476 and x <= 1487 and right == false then test = true else test = false end i want change the test to true when the rectangle is in the granted position, but how can i get the momentary position of the dx rectangle?
×
×
  • Create New...