Jump to content

Emilio_M

Members
  • Posts

    87
  • Joined

  • Last visited

Everything posted by Emilio_M

  1. Not a rectangle i want to make a circle progress bar
  2. With that you cant draw a part of the circle.
  3. Hi guys. Today i want to make a progress bar in circle. I try somethings with this : viewtopic.php?f=108&t=33342 I want to make a circle with life and armor ( or other else ranging from 0 to 100 ) like : 0 to 180° = life - who start at 0° ( counterclockwise of a watch ) 0 to 180° = armor - who start at 0° ( clockwise ) But, what are calculation and image who i whould take to make it ? I thinks it's a big question. Thanks all !
  4. On dxDrawText there is scale but on dxDrawRectangle there is no scale. What is the calculs for rectangle ? Thanks.
  5. https://wiki.multitheftauto.com/wiki/On ... WeaponFire https://wiki.multitheftauto.com/wiki/GetElementType https://wiki.multitheftauto.com/wiki/FixVehicle
  6. Okay thanks. But now, i want to draw a progress bar, how to calculate the correctly position with the % of the progress bar with distance included. ? Thanks.
  7. Yes but i want the calculations
  8. Yes. Draw with world position with different scale due to the distance with the world point.
  9. Hi guys. Today i want you for one thing.. Everywhere we see dxDraw(text, rectangle, line etc... ) with world position : https://wiki.multitheftauto.com/wiki/Ge ... ldPosition Ok but how to calculate the correct x and y position of the screen ( with perspective : distance ) ? I 're not found a tutorial or help about that with google. How To make a correct Progress Bar with DX ? Thanks to all !
  10. Ok thanks guy ! You saved me... I'm crazy about that.. Thanks
  11. finalBlip[hitElement] = createBlipAttachedTo(finalMarker[hitElement],19) Sry, Line19
  12. Test that : plane = {} finalMarker = {} finalBlip = {} missionMarker = createMarker ( -1626.1, -373.5, 13.4, "cylinder", 2, 0, 255, 255, 170 ) addEventHandler("onResourceStart", resourceRoot, function ( ) missionBlip = createBlipAttachedTo(missionMarker,53) outputChatBox( "[Plane Mission] Ota ammatti lähtölippu kuvakkelta.", player, 0, 255, 255 ) end ) addEventHandler("onMarkerHit", missionMarker, function ( hitElement ) if (getElementType ( hitElement ) == 'player' ) then plane[hitElement] = createVehicle ( 519, -1654, -162, 14, 0, 0, -45 ) warpPedIntoVehicle ( hitElement, plane[hitElement] ) outputChatBox( "[Plane Mission] Lennä punaiselle lipulle.", hitElement, 0, 255, 255 ) finalMarker[hitElement] = createMarker (338, 2505, 16, "checkpoint", 6, 255, 255, 0, 170 ) finalBlip[hitElement] = createBlipAttachedTo(finalMarker[thePlayer],19) end end ) function Remove(thePlayer) if (getElementType(thePlayer) == "player") then if (finalMarker[thePlayer] ~= nil) and (source == finalMarker[thePlayer]) then if isElement(finalMarker[thePlayer]) then givePlayerMoney ( thePlayer, 10000 ) removeEventHandler("onMarkerHit", finalMarker[thePlayer], Remove) destroyElement(finalMarker[thePlayer]) outputChatBox( "[Plane Mission] Kiitos kun veit lentokoneen huoltoon. Saat 10K palkkiota.", hitElement, 0, 255, 255 ) end if isElement(finalBlip[thePlayer]) and isElement(plane[thePlayer]) then destroyElement(finalBlip[thePlayer]) destroyElement(plane[thePlayer]) end end end end addEventHandler("onMarkerHit", getRootElement(), Remove)
  13. Create a table like plane = {} and create the vehicle like : plane[hitElement] = createVehicle.... and destroy it like : destroyElement(plane[thePlayer])
  14. Godness. It's that ! I change FPS limit to 100. What is the maximum for avoid this bug ?
  15. I don't have specific code for that because i don't know where this bug appear. I just I look for the causes.
  16. Hi guys. Today, i want you for solve a problem... I add some scripts on my server and later I 've realized one thing. Like: When i aim a weapon ( right click ) i press "forward" or "left" or "right" or "backward" touch and it's doing nothing like i was frozen but no. -> I'm not frozen, -> all controls are enabled ( https://wiki.multitheftauto.com/wiki/ToggleControl ) -> When stay on forward touch my ped move but after 20s or 30s.... -> When I reboot the server it's OK but when i restart any resources the bug appear. I dont understand why because i'm not freeze and controls are not disabled... I also change my stats ( https://wiki.multitheftauto.com/wiki/SetPedStat ) it's doing nothing.. Thank's to all.
  17. Thx but if i want [1] table145[player][slot][1] = object table145[player][slot][1] = nil How i proceed ? Thanks.
  18. Hi all, Today i have a very strangous error.... Like at if not table145[thePlayer][i][1] then -> thePlayer is the player element ( it's verified ) -> i it's in a for i=1,12 do at the top I add local table145 = {} and function fixConnect ( res ) for k,v in ipairs(getElementsByType("player")) do table145[v] = {} end end addEventHandler ( "onResourceStart", getResourceRootElement(), fixConnect ) I don't understand why... Thanks..
  19. of https://wiki.multitheftauto.com/wiki/SetFarClipDistance or engineSetModelLODDistance(model, 300) ?
  20. Yes it still visible i have already test that.
  21. The correct response is 191. I think 18164 was not correct and it's not correct. 191 is the correct value. Sorry for this mistake. EDIT : Do you think it's because my object isnt stream ? I have a small portion of my mapping who was created with createObject function. The remaining is created by .map files including my mapping concerned. Thanks all.
×
×
  • Create New...