Jump to content

villr

Members
  • Posts

    158
  • Joined

  • Last visited

Everything posted by villr

  1. I also started on a Sims Project but i'll think i wait for your one instead I really hope you good luck! http://www.mtasims.wordpress.com (my project, its kinda based on Sims 1 GUI but ye) I would maybe like to help anyways with something if that's possible!
  2. villr

    Calculating time

    What i meant with my post was, im going to have an thing in Area51 that will say when you enter, it was 5hours since you last visited here, or, it was 1 day and 5 hours since you last visited here. The time will be calculated from a data that has been saved as example 2013 06 14 22 10 but im not sure how i should calculate this, i only know how to calculate the days and total hours
  3. villr

    Calculating time

    That was just some test code... But what i want is to calculate how many days and hours it has passed since the player last entered. But i have no idea about how i'll should calculate it.
  4. The thing that im trying to do and what im gonna have it to is like this, it will be a bot that says like, it was 1day and 3 hours since you last visited here. or it was 5 hours since you last visited here I have some code i tested but i wasent even sure what i was doing but here it is.. TD2 = tonumber(20130615) OD2 = tonumber(20130610) hDays = (TD2-OD2) totH = hDays*24 curH = totH/h outputChatBox(hDays.." days, "..curH.." hours "..(totH).." total hours") Anyone know how to do it?
  5. villr

    Key pressed

    Thank you so mutch
  6. villr

    Key pressed

    Is there anyone that knows if there is an exisiting event for like onKeyPressed? I want to make like in singleplayer, when you types in cheats, like example: hesoyam Had been the easiest way.. because there is only bindkey and you can only bind one key..
  7. STOLEN! https://community.multitheftauto.com/index.php?p=resources&s=details&id=7109 https://community.multitheftauto.com/index.php?p=resources&s=details&id=7106 DONE
  8. villr

    DX resoulution

    EDIT: Solved! I managed to figure out myself how to fix it by your code. Thanks ! Had to remove my own function, but your code still saves alot of time.
  9. villr

    DX resoulution

    What? I dont understand you.
  10. villr

    DX resoulution

    Oh sorry, i see i typed wrong to u... The code i made is taking that resoulution(1360x768) and then calculates new res based on the players res.
  11. villr

    DX resoulution

    That wont be right, because that wont fit my resoulution, the numbers of dividing is the numbers of my resulution. But that dont work either, the problem is that it does the calculationg over and over again, try the code yourself and you will see what i mean, if you add debug you will see that the third argument will dissapear
  12. villr

    DX resoulution

    Yes but i have that, i see now that i just forgot to copy that to here. local sW, sH = guiGetScreenSize() function fixSimsDXRes(r1,r2,r3,r4) return sW*(r1/1360), sH*(r2/768), sW*(r3/1360), sH*(r4/768) end
  13. villr

    DX resoulution

    Hi there! I have a problem with my dx thing i made for resoulutions, i made it so it should be easier so dont have to count the math self on every dx element because the thing im making now is around 100 dx element, this is the code: function fixSimsDXRes(r1,r2,r3,r4) return sW*(r1/1360), sH*(r2/768), sW*(r3/1360), sH*(r4/768) end dxDrawRectangle(fixSimsDXRes(94, 677, 135, 28), tocolor(3, 20, 112, 255), true) dxDrawRectangle(fixSimsDXRes(0, 612, 94, 129), tocolor(3, 20, 112, 255), true) dxDrawRectangle(fixSimsDXRes(94, 612, 136, 29), tocolor(3, 20, 112, 255), true) The problem is, i dont know how to make it stop fixing the resoulution all time, because it goes on and the positions get wrong. How can i fix this??
  14. villr

    Plane wings

    Thanks alot man!! That was just what i was searching for !!! Thanks!
  15. villr

    Plane wings

    Is there anyone that knows if you can check how the wings on a aircraft is? Like checking if they are on fire or what state they are in or just something about them..? Already searched the wiki some but yeah, if someone have a tip or smth write here.
  16. Can you report someones script to this forum thread because they stole like the base of the code from me? The code is similar to my code, some things are changed.. But has the same argument names and things like that, so is it something i can report? I guess he might got the code from when my whole server was leaked out on community https://community.multitheftauto.com/ind ... ls&id=3292 DONE
  17. Stolen... https://community.multitheftauto.com/ind ... ls&id=6222 DONE
  18. villr

    Help with GUI

    Thank you very mutch
  19. villr

    Help with GUI

    function isAnyGuiVisible() for i,gui in ipairs(getElementsByType("gui-window")) do if ( guiGetVisible (gui) == true ) then outputChatBox("true") return true else outputChatBox("false") return false end end end This will only return me false
  20. villr

    Help with GUI

    Ohhh, thanks im going to test that, i'll come back with a result.
  21. villr

    Help with GUI

    Is there anyone that knows how to check if there is any gui open on the players screen? Or someone that knows how to make one special funciton for it?
  22. Hello, how can i define how many objects i get from this code? local objects = 0 addEvent( "seeIfThereisCrates", true ) addEventHandler( "seeIfThereisCrates", getLocalPlayer(), function (player) for i,elem in ipairs(getElementsByType("object")) do if getElementModel(elem) == 2912 then local objects = elem+1 outputChatBox("client:".. objects) Itested that and didnt work It always tell me 1. EDIT: And dont think i didnt use ends and things like that because its not in the code LOL.
  23. No it isent, its same problem with all dff's im trying to replace on peds
×
×
  • Create New...