Jump to content

Cadu12

Retired Staff
  • Posts

    827
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Cadu12

  1. function myGate() gate = createObject(980, 1012.5, -902.5, 43, 0, 0, 95) local gateTimer = getTime() if (gateTimer < 6) then moveObject (gate, 500, 96.861328, 1915.637, 30 ) else moveObject (gate, 500, 1012.5, -902.5, 43 ) end end setTimer(myGate, 60000, 0) If you want check, you must wait 60 sec to open/close.
  2. You can make with shader. This isn't needed.
  3. Cadu12

    question

    Show us your code, and how are you doing it.
  4. Cadu12

    dxGetStatus

    https://wiki.multitheftauto.com/wiki/DxGetStatus Read the wiki about function.
  5. E precisa de página em português? Para programar é preciso saber o básico de Inglês, se ele não consegue as páginas da Wiki é melhor começar a estudar inglês primeiro. Isso é verdade. É melhor a estudar inglês primeiro e depois aprender Lua. Eu leio wiki em inglês, nem em portugues.
  6. Quando vc aprendeu Lua que eles te deram links, aqui segue também: https://wiki.multitheftauto.com/wiki/Scr ... troduction Desculpa, este pagina não tem em portugues.
  7. First you use guiCreateStaticImage after use guiCreateComboBox ( at end line ).
  8. Cadu12

    Autologin

    Yes, it is possible.
  9. local groupY = 0 for index, group in ipairs ( testGroups ) do friendsList [ "main" ] [ "contacts_group_".. group.name ] = guiCreateLabel(0.00, groupY, 0.98, 0.06, group.name ..":", true, friendsList [ "main" ] [ "contacts_scrollPane" ]) for index, contact in ipairs ( group.contacts ) do friendsList [ "main" ] [ "contacts_contact_state_".. contact.name ] = guiCreateStaticImage(0, 0, 0.05, 0.06, "images/".. contact.state ..".png", true, friendsList [ "main" ] [ "contacts_scrollPane" ]) friendsList [ "main" ] [ "contacts_contact_label_".. contact.name ] = guiCreateLabel(0, 0, 0.90, 0.06, contact.name, true, friendsList [ "main" ] [ "contacts_scrollPane" ]) local height = guiLabelGetFontHeight ( friendsList [ "main" ] [ "contacts_contact_state_".. contact.name ] ) guiSetSize(friendsList [ "main" ] [ "contacts_contact_state_".. contact.name ], 0.03, ( index * height ) + groupY, true) guiSetSize(friendsList [ "main" ] [ "contacts_contact_state_".. contact.name ], 0.10, ( index * height ) + groupY, true) end groupY = ( ( #group.contacts + 1 ) * guiLabelGetFontHeight ( friendsList [ "main" ] [ "contacts_group_".. group.name ] ) ) + groupY end Try this code. Not tested
  10. -- Wrong: dxGetFontHeight ( 1, "default-normal" ) / sy -- Use: (dxGetFontHeight ( 1, "default-normal" ) / sy)
  11. Please do not double-post some hours. You must wait anyone to post.
  12. As you can see it, becuase of your math. Maybe your font scale are wrong again.
  13. I can't test it becuase GUI code isnt full. My math are right. I used your math with dxDrawText, and it bugged.
  14. addEventHandler("onClientRender", getRootElement(), function() local groupY = 0 for index, group in ipairs ( testGroups ) do dxDrawText(group.name, 0, groupY, tocolor(255, 255, 255, 255), 1, Font, "left") for index, contact in ipairs ( group.contacts ) do dxDrawText(contact.name, 10, (index * dxGetFontHeight(1, Font)) + groupY, tocolor(0, 255, 0, 255), 1, Font, "left") --friendsList [ "main" ] [ "contacts_contact_state_".. contact.name ] = guiCreateStaticImage(0.03, ( groupY + 0.10 * index ), 0.05, 0.06, "images/".. contact.state ..".png", true, friendsList [ "main" ] [ "contacts_scrollPane" ]) --friendsList [ "main" ] [ "contacts_contact_label_".. contact.name ] = guiCreateLabel(0.10, ( groupY + 0.10 * index ), 0.90, 0.06, contact.name, true, friendsList [ "main" ] [ "contacts_scrollPane" ]) end groupY = ((#group.contacts + 1) * dxGetFontHeight(1, Font)) + groupY end end) You can edit it, it was problem math, I told you.
  15. I dont see any wrong, may be problem with math. What do you use font scale? You can try use dxGetFontHeight or guiGetSize.
  16. We aren't going make scrip for you, only we can do is FIX your script. Please go learn Lua.
  17. Make your own radar? If so, you have to make maths and dxdraws, but still isnt easy. If not, what do you mean?
  18. Cadu12

    Road Rage

    Version: 1 Dont worry, I know, im sucks at record, I can't make HD.
  19. Cadu12

    Question

    Just copy it from Race gamemode, which it has.
  20. It will get laggers when you have over 10.000 or 5.000 lines. So you can't make your own library?
  21. function getCashFromTeamPlayers(team) local amount = 0 if isElement(team) and getElementType(team) == "team" then for i, v in ipairs(getPlayersInTeam(team)) do amount = amount + (getPlayerMoney(v) or 0) end end return amount end 2nd, what do you mean by that?
  22. First, use SELECT, if returns 0 or doesnt exists, then use INSERT INTO
×
×
  • Create New...