Jump to content

arezu

Members
  • Posts

    446
  • Joined

  • Last visited

Everything posted by arezu

  1. You can use mine which i made for DD once.. http://www.mediafire.com/?8nz9fjr1tcchiev you can study it if you want to learn and improve it (its not perfect), or just edit it a bit to fit your needs.
  2. thats whats it is doing.. did you even try them?
  3. arezu

    Downloading

    maybe add a line to meta file if the creators wants the download to work that way? if nothing is added, then it should work like it does now.
  4. arezu

    Downloading

    I have seen similar suggestions before.. but i'll write it anyways. (I dont know if its already possible somehow by scripting) it would be great if script files are downloaded before other files and that the scripts can be used before all downloads are finished. And then an event like: onDownloadFinished, with parameters: thePlayer, fileName, fileType. thePlayer - the player that finished download a file. fileName - name of the downloaded file. fileType - for example: .mp3, .txd (can use string functions to get it from filename, but its cleaner this way) So playSound can be used after the client has finished downloading the music file. Many maps cant use music files, or textures if the maps uses scripts at the beginning...
  5. its not accurate to calculate positions only based on screen width, because it only works if screen "dimension" or whatever is the same as 1280x720, for example it wont work correctly on a 1280x1024 screen.. so try this instead: local screen_x, screen_y = guiGetScreenSize() -- diffX and diffY is how many times bigger the users screen resolution is compared to yours. local diffX = screen_x/1280 local diffY = screen_y/720 local font = "bankgothic" -- scaling is based on the difference of screen width. or set scale = 0.6 if you want text to have same size as your screen. looks better when only multiplying with diffX. local scale = 0.6*diffX dxDrawText(textJoin, 943.0*diffX, 217.0*diffY, 1211.0*diffX, 235.0*diffY, tocolor(0, 0, 0, 255), scale, font, "left", "top", false, false, false) dxDrawText(textJoin, 939.0*diffX, 213.0*diffY, 1207.0*diffX, 231.0*diffY, tocolor(0, 255, 0, 255), scale, font, "left", "top", false, false, false)
  6. local screen_x, screen_y = guiGetScreenSize() local font = "bankgothic" local scale = 0.6 dxDrawText(textQuit, screen_x*(959.0/1280), screen_y*(246.0/720), screen_x*(1227.0/1280), screen_y*(264.0/720), tocolor(0,0,0,255), scale, font, "left", "top", false, false, false) dxDrawText(textQuit, screen_x*(956.0/1280), screen_y*(243.0/720), screen_x*(1224.0/1280), screen_y*(261.0/720), tocolor(255,0,0,255), scale, font, "left", "top", false, false, false)
  7. HTML is easiest? i know c++, java, pascal, lua and php but not HTML, and i have read html at school :F
  8. Use the screen width and height and divide, or multiply with a value under 1.. for example: local screen_w, screen_h = guiGetScreenSize() local guiWidth = 500 local guiHeight = 500 -- creates a window with 500 pixels width and height, and puts it on the center of the screen. local guiWindow = guiCreateWindow(screen_w*0.5 - guiWidth*0.5, screen_h*0.5 - guiHeight*0.5, guiWidth, guiHeight, "Centered window", false)
  9. Look at the examples on that page. They are clear enough.
  10. There are scripts that uses those functions, so i would recommend you to NOT remake user system.
  11. use debugs like this to see whats wrong: function loadText ( resource ) if not resource and source then resource = source elseif not resource and not source then return end if not fileExists ( ":" .. getResourceName ( resource ) .."/texts.xml" ) then return end local node = xmlLoadFile ( ":" .. getResourceName ( resource ) .."/texts.xml" ) if(node == false)then outputChatBox("error loading file") end for i, t in ipairs ( xmlNodeGetChildren ( node ) ) do --This part is done, no need to show it because it has no trouble end addEventHandler ( "onResourceStart", getRootElement ( ), loadText )
  12. 64 mb video card?? dude we dont live in the stone age anymore. a computer like that is around 1 dollar/free these days
  13. addEvent("onRaceStateChanging", true) addEventHandler("onRaceStateChanging", getRootElement(), function(newStateName) if(newStateName == "PostFinish")then -- when only one player left alive. end end) i think that was how i used to do it.. i dont remember.
  14. -- client sided addEventHandler("onClientRender", getRootElement(), function() if(isElementInWater(getLocalPlayer()))then triggerServerEvent("onPlayerHitWater", getLocalPlayer()) end end) -- smoke effect (not tested) addEvent("onPlayerHitToxicWater", true) addEventHandler("onPlayerHitToxicWater", getRootElement(), function() local posX, posY, posZ = getElementPosition(source) fxAddTyreBurst(posX, posY, posZ, 0, 0, 3) end) -- server sided addEvent("onPlayerHitWater", true) addEventHandler("onPlayerHitWater", getRootElement(), function() if(isPedDead(source))then return end killPed(source) triggerClientEvent("onPlayerHitToxicWater", source) end)
  15. --server sided local vehicleMarker = createMarker(1552.33, -1605.37, 13, 'cylinder', 2.0, 255, 0, 0, 150 ) function vehicleMarkerHit ( hitElement, matchingDimension ) if getElementType ( hitElement ) == "player" and not isPedInVehicle (hitElement) then local vehicle = createVehicle ( 468, 1552.33, -1605.37, 13 ) warpPedIntoVehicle(hitElement, vehicle) end end addEventHandler( "onMarkerHit", vehicleMarker , vehicleMarkerHit )
  16. arezu

    outstring

    outstring? what do you want to do? output text on screen or what
  17. arezu

    isNumeric()

    show how you are calling the function in your script
  18. arezu

    isNumeric()

    function isNumeric(value) if(value == tonumber(value))then return true else return false end
  19. Which gamemode are you running? if you are running race, then it should automaticly do so for you.. shouldn't it?
  20. arezu

    DM steel wire

    Thanks for making original maps into the MTA world, right now when it needs it! ... Where can I play your maps?
  21. I have seen this since 1.0.4 ... my friend had the same fps (max fps) as many others and were still driving faster than everyone else. Some people drive faster than others, even thought they dont use cheats or modified files of any kind.
  22. arezu

    meta.xml

    setElementCollisionsEnabled(theElement, false)
  23. i have also had this bug, my friends too.. it happens when testing map in map editor (in mta 1.05 map editor)
×
×
  • Create New...