Jump to content

Modafinil

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Modafinil's Achievements

Member

Member (5/54)

0

Reputation

  1. I'm trying to change the visibility of a blip, trying to make it visible to everyone except the player pd_blip[player] = createBlipAttachedTo(player, 0, 3, 255, 0, 0, 255, 32767) setElementVisibleTo(pd_blip[player], player, false) the blip remains visible to the player and setElementVisibleTo returns false. Did i do something wrong?
  2. Hello everybody. Does anyone have a working download link for this resource?
  3. Yes, the script is right. I even tried both "onClientRender" and "onClientPreRender". No sucess.
  4. Hello everybody. I'm trying to create a 3d rectangle using https://wiki.multitheftauto.com/wiki/DxDrawRectangle3D The problem is that nothing happens when I try to use it. I even tried the example in the wiki, but without success. Some help? The problem is that nothing happens when I try to use it. I even tried the example in the wiki, but without success. Some help? The problem is that nothing happens when I try to use it. I even tried the example in the wiki, but without success. Some help?
  5. Hello. Is it possible to change the size/scale of a model? not an object, but a model. I'm trying to create a custom model pickup (engineRequestModel("object")) but the pickup is too small.
  6. Hello, i'm trying to draw a text next to the 'watermark' that shows fps and ping In my resolution (1440x900) its normal But when i test at 800x600 ... Thas my code local sx_, sy_ = guiGetScreenSize() local sx, sy = sx_/1440, sy_/900 addEventHandler("onClientRender", root, function() local a = string.format("FPS: %d PING: %d", fps, getPlayerPing(localPlayer)) dxDrawText(a, 1250*sx, 885*sy, 1359*sx, 900*sy, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end ) I followed the methods described in this topic https://forum.multitheftauto.com/topic/96776-tut-scaling-drawinggui-elements-for-all-resolutions/ If anyone can help me, I'd appreciate it
  7. eai pessoal, eu nao manjo muito de dx, dai to com uns problemas eu to tentando fazer um pedaco de texto pequeno que mostra o fps e o ping que fica do lado da 'marca dagua' do mta quando to fazendo no guieditor fica assim mas quando vou testar em 800x600 fica assim minha resolucao é 1400x900, eu ja usei o 'relative' do guieditor. tipo, eu nao to falando do tamanho do texto, o argumento 'scale' mas da posicao dele na tela eu ja segui alguns tutoriais aqui no forum em ingles mas creio que perdi algo meu codigo atual é esse local sx_, sy_ = guiGetScreenSize() local sx, sy = sx_/1440, sy_/900 addEventHandler("onClientRender", root, function() local a = string.format("FPS: %d PING: %d", fps, getPlayerPing(localPlayer)) dxDrawText(a, 1250*sx, 885*sy, 1359*sx, 900*sy, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end ) se alguem puder me dar uma luz eu agradeço muito kkkkk
  8. Modafinil

    Pairs Loop

    Hello, i'm having troube doing a pairs loop on a table. I'm doing the following local test = {} for i = 0, 9, 1 do test[i] = 4 end for i, v in pairs(test) do print(tostring(i)) end Which prints the following [2022-07-02 11:46:19] INFO: 1 [2022-07-02 11:46:19] INFO: 2 [2022-07-02 11:46:19] INFO: 3 [2022-07-02 11:46:19] INFO: 4 [2022-07-02 11:46:19] INFO: 5 [2022-07-02 11:46:19] INFO: 6 [2022-07-02 11:46:19] INFO: 7 [2022-07-02 11:46:19] INFO: 8 [2022-07-02 11:46:19] INFO: 9 [2022-07-02 11:46:19] INFO: 0 The first element inserted into the table is the last in the loop, any explanation?
  9. How could i forget that? Thanks!
  10. Hello, I would like some help. Imagine a hypothetical situation. I create 100 pickups on my server and each pickup sends a different message to the player. I came up with 2 ways to do this and I wish you could tell me which is the best in terms of resources. addEventHandler("onPickupHit", pickupSourceHere, function(player) outputChatBox("the message here", player) cancelEvent() end) addEventHandler("onPickupHit", resourceRoot, function(player) if source == pickupSourceHere then outputChatBox("the message here", player) cancelEvent() end end) Thanks! Oh, and sorry about my english.
×
×
  • Create New...