Jump to content

DjSt3rios

Members
  • Posts

    113
  • Joined

  • Last visited

DjSt3rios's Achievements

Sucka

Sucka (13/54)

0

Reputation

  1. Hello. I need some help. I would like to calculate the position in front of the player's vehicle. I tried a few things but nothing seems to work. Do you have any idea how to do that?
  2. You don't have Skype, do you? I do. Same username as here.
  3. You are welcome I am looking forward to hearing from you.
  4. Alright, but as I said you might have to make changes to make it work. Well here is some piece of code: g = exports.dxGUI window = g:dxCreateWindow(getThisResource(),-1,-20,1922,1100,"test", white, default, g:dxGetDefaultTheme()) but = g:dxCreateButton(getThisResource(),160,90,300,80, "test", window) fresx = 1920 fresy = 1080 sresx = 1024 sresy = 768 [code] Now this will create a window in 1922 x 1100 (to make it full screen, outside of the screen) Now you will need to get the users GUI screen size, i haven't cioded that but I guess you can make it. Then you will do something like that: [code]g:dxSetSize(window, sresx+2,sresy+20) g:dxSetPosition(window, -1,-20) local elements = getElementChildren(window) -- the child elements for k,v in ipairs(elements) do width,height = g:dxGetSize(v) g:dxSetSize(v, width*(sresx/fresx), height*(sresy/fresy)) x,y = g:dxGetPosition(v) g:dxSetPosition(v, x*(sresx/fresx), y*(sresy/fresy)) end if you don't use dxGui you will have to make some changes to the functions too. Also one more note, if the user has a bigger screen resolution, where it says sresx/fresx it should be like fresx/sresx (well smaller number goes first.) If you have any other problems with this let me know. I hope I helped.
  5. I have been looking for age's for an answer for this, but i am yet to find anything. Maybe a Pro GUI'er will be able to help! Actually I think I found my solution. Although it might not fit perfect, but it looks pretty good so far. I just find the difference in percentage by dividing the new resolution with the old (1920 as x and 1080 as y, the one i originally made it and set it up), and then i get all the elements, their size and their position and i multiply it by the percentage (eg 0.50 for half size and position). If you want I can give you some of my code, although it might need some changes, because its kinda a mess right now, I just managed to make it work alright
  6. Hello everyone. I am using dxGui and I create window, and I made it full screen by getting the screen resolution and making it a little bit bigger. I would like to ask you something, If someone has a smaller resolution, the GUI would have to become smaller. the problem now is, the buttons/images will stay big and it will not be shown properly. Do you think it would be possible to fix this problem? I was thinking to compare the original resolution i made it with with the current the user uses, and then somehow resize them or/and move them. What's your opinion about this?
  7. I used getRealTime with a lot of calculations and I made it work. Thanks for the help.
  8. Hmm yeh almost, but I am not sure if this can make the work. I want to count like weeks. I want something that takes weeks, and I Want to compare two dates. If you have any other idea please let me know. I am going to give it a try anyway. Edit: Well this counts the time from the time server starts, but it's not what I need
  9. Hello. I was wondering if it's possible to convert Date to Millisecond, and if possible the opposite too. If anybody knows a way please tell me.
  10. Hello everybody. Lately i saw some updated race game mode, like, messages with FPS on the screen, in multiple servers, so i thought maybe there is an updated version or something of Race gamemode.. i don't really think that many people just steal the idea and they put it in the same location If anybody knows something, let me know please! Thanks
  11. Hmmm, I will try. I will let you know if I fix it.
  12. ok so I got a speedometer, and here is the DxDrawImage code: dxDrawImage(150, 800, g_ImageW, g_ImageH, "needle1.png", rpm/30, 0, 0, white, true) I also tried to use guiSetProperty and set X or Y or Z Rotation to it, but didn't work at all...(co i could use GuiCreateStaticImage instead of dxDrawImage)
  13. I tried, but nothing. Even it if it is true, or it's false, same thing, it's behind my GUI
×
×
  • Create New...