Jump to content

DjSt3rios

Members
  • Posts

    113
  • Joined

  • Last visited

Everything posted by DjSt3rios

  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
  14. Hello guys. I have a small problem, I created an image with guiCreateStaticImage, and then I used dxDrawImage to draw an image on the other image, but the second image is not visible... I tried to use guiMovetoBack function, but didn't work. Any idea?
  15. Hello. I have a problem with a map I made. I opened a local server, with the latest version, 1.1.1 I changed the handlings, and it was working just fine. When I uploaded my map to my server, it was bugged. It's 1.1... can this be the problem? I dont have any other explaination...
  16. Hello guys. I wanna make a command to get all the handlings of the car, the acceleration, mass etc. I tried to use this function, but still It's not working: function carhandlings(thePlayer, command) local handlings = getVehicleHandling(getPedOccupiedVehicle(thePlayer)) for i,v in ipairs(handlings) do outputChatBox(i,v) end end addCommandHandler("handlings", carhandlings) I don't get any errors, I just don't see any message. Any help?
  17. Hmmm, I could make the car spawn behind the player with a certain speed, and then do it with the way you said.... sounds interesting. I will give it a try when I find some time.
  18. so anyone got any idea how i could make it?
  19. Hmmm, I thought of something else.. I could create a police car behind the player with a speed, and make the police go straight head to the car.. the thing is that to rotate we could use setElementRotation, but I would prefer something more realistic...
  20. Actually I want the cops to be in cars, and chase a player.. thats a bit hard
  21. Hello! I wanted to ask some questions... First of all I was thinking of making a code to make cops chase you... but I still have some questions before I start working on it... I was wondering if its possible to make the cops go from the same way the suspect went... or if its possible to record the keys that the player presses, and then make the cop do the same thing.. first of all the cop would be created behind the player, and it will start doing the same things, something like that... Do you think it is possible to make it?
×
×
  • Create New...