Jump to content

..:D&G:..

Members
  • Posts

    1,028
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by ..:D&G:..

  1. ..:D&G:..

    problem

    addEventHandler("onClientRender", getRootElement(), function () for k,v in ipairs(getElementsByType("player")) do if getPlayerTeam(v) == getTeamFromName("Military") then if v == localPlayer then return end dxDrawTextOnElement(v,"Army",1,20,0,255,0,255,1,"bankgothic") end end end)
  2. And what exactly is happening in the background? Is there a way to minimize the type that stays there?
  3. I don't think you understand... I am not even using a GUI element, I am using a dxDrawText which I have to adjust the font to different resolutions.
  4. Why not use the DX browser? If I recall correctly you draw it as an image, making resizing very easy. And you can do other fancy DX stuff with it One of the reason dont using dx - dx mouse features - the doesnt exists. And, of course, graphic interface, not working on dx so good than gui. You can use this: https://wiki.multitheftauto.com/wiki/IsMouseInPosition By the way, really nice work
  5. Hi, how can I adjust the font of a dx text to the player's resolution? Thanks.
  6. So... wut is this? On my server it shows about 1000MB on top of that spinny thing, and it appears again when the login panel is displayed, freezing the client for a minute or so.
  7. Well this here are the techniques
  8. So then... no one knows how to fix it or what's wrong with it?
  9. Hello, I am using a screen blur effect shader but it doesn't seem to create the shader: Thanks.
  10. I know that.. but I don't want a simple gui memo, I want a DX one but the thing is that there is no dx memo element where you can input and delete text.
  11. Hello, so I've seen a lot of people using DX Drawn memos for their login panels or other panels, and I would like to know how to make a dx memo and how to get the text from it so I can compare it in an "if" statement. Thanks.
  12. I've took your advice and made 2 separate tables for the pickups and for the pickups found by the player, thanks
  13. So there is no efficient way of saving everything in only 1 table?
  14. Yeah but the thing is that there are 150 pickups, and if the player relogs or if the resource gets stoped, I want everything to be saved so that the player doesn't have to find all the pickups again
  15. So I want to do quest thing where the players have to look and hit 150 pickups in order to use the command /getgift to get a gift... The problem is, I don't know the best way of storing each pickup to each player so that a player cannot use the same pickup twice. So yeah... I need a reliable and easy way to store all this in a MySQL database
  16. Is there an event like "onPlayerMove" or something like that? I want to make a player to player teleport system and when the player sends a request to another player, if they move the teleportation request cancels... Thank You
  17. I am trying to attach an object to the vehicle. I know I 've tried this function with a player and an NPC, and whenever I turned arround, the NPC was still facing north
  18. So I want to create my own vehicle customization system instead of using addVehicleUpdate. The problem is using attachElements the object attached to the vehicle does not update the rotation when the vehicle turns... So, is there any way I can make it rotate while the vehicle rotates? Thank you
  19. Is there a way to warn the admins when a player binds a specific command? Because there are people that join my server and bind their advertisment of other servers on the "/pm" command and start spamming every player's private message. Thanks.
  20. I've noticed that you used "pairs" for that loop, but I always use "ipairs", what's the difference between these two? Lol
  21. I only use ipairs and this is the other, and only loop is this: amount = 0 for s, o in pairs(occupants) do local amounta = amount amount = amounta + 1 end local maxPassengers = getVehicleMaxPassengers(vehicle) if not (getElementData(thePlayer, "gfFollow") == nil) then for i, v in ipairs(getElementsByType("ped")) do if (getElementData(v, "name") == getElementData(thePlayer, "hasGirlfriend")) and (getElementData(v, "type") == "girlfriend") then girlFriendPed = v end end
  22. I don't think that will work. As you see those "Rank" icons, a new one is added when a player is logged on the server, and players have different ranks so therefore different icons. This is how the icons are drawn: local SCOREBOARD_WIDTH = 375 -- The scoreboard window width local SCOREBOARD_HEIGHT = 400 -- The scoreboard window height local g_windowSize = { guiGetScreenSize () } -- The window size local g_currentWidth = 0 -- Current window width. Used for the fade in/out effect. local g_currentHeight = 0 -- Current window height. Used for the fade in/out effect. local SCOREBOARD_X = math.floor ( ( g_windowSize[1] - SCOREBOARD_WIDTH ) / 2 ) local SCOREBOARD_Y = math.floor ( ( g_windowSize[2] - SCOREBOARD_HEIGHT ) / 2 ) -- Pre-calculate each row horizontal bounding box. local rowsBoundingBox = { { SCOREBOARD_X, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } } local maxWidth = SCOREBOARD_X + g_currentWidth local left = rowsBoundingBox[1][1] -- Draw the body. -- Update the bounding box. local left, top, bottom = SCOREBOARD_X, SCOREBOARD_Y + SCOREBOARD_HEADER_HEIGHT + 2, SCOREBOARD_Y + g_currentHeight - 2 -- Pre-calculate how much height will each row have. local rowHeight = dxGetFontHeight ( 1, "default-bold" ) -- Add the offset for a new row top = top + rowHeight + 3 dxDrawImage(left-10, top, 50, 20, "ranks/LEVEL"..rank..".png", 0, 0, 0, tocolor(255, 255, 255, 255), SCOREBOARD_POSTGUI)
×
×
  • Create New...