Jump to content

RekZ

Members
  • Posts

    329
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by RekZ

  1. function drawSpeedo()
    
    	if isPedDead(localPlayer) then 
    		Player = getCameraTarget ()
    	else
    		Player = localPlayer
    	end
    
        if isPedInVehicle(Player) then
    		veh = getPedOccupiedVehicle(Player)
    		if isElement(veh) then
    			specHealth = getElementHealth(veh)
    			sHealth = (math.max(specHealth - 250, 0)/750)*100
    			colorR = sHealth > 50 and (255/100)*(100 - sHealth*2) + 255 or 255
    			colorG = sHealth > 50 and 255 or (255/100)*(sHealth*2)
    
    			sx, sy, sz = getElementVelocity (veh)
    			spectSpeed = math.floor(((sx^2 + sy^2 + sz^2)^(0.5))*180)
    
    			dxDrawText(spectSpeed.." km/h", (1680/1920)*sX, (940/1080)*sY, (1804/1920)*sX, (966/1080)*sY, tocolor(255, 255, 255, 255), (1/1920)*sX, font, "center", "top", false, false, false, false, false)
    			dxDrawRectangle((1620/1920)*sX, (990/1080)*sY, (((specHealth/10)*2.5)/1920)*sX, (7/1080)*sY, tocolor(colorR, colorG, 0, 255), false)
    			dxDrawCircle (((1620+(specHealth/10)*2.5)/1920)*sX, (993/1080)*sY, 7, 0, 360, tocolor(colorR, colorG, 0, 255), tocolor(colorR, colorG, 0, 255), 32, 1, false)
    
    			if getVehicleUpgradeOnSlot(veh, 8 ) then
    				nosLevel = getVehicleNitroLevel(veh)*100 or 0
    				nosColor = isVehicleNitroActivated(veh) and colorTable[ "using" ] or isVehicleNitroRecharging(veh) and colorTable[ "chargin" ] or colorTable[ "stock" ]
    				dxDrawRectangle((1620/1920)*sX, (1020/1080)*sY, (((nosLevel*250)/100)/1920)*sX, (7/1080)*sY, nosColor, false)
    				dxDrawCircle (((1620+(nosLevel*2.5))/1920)*sX, (1023/1080)*sY, 7, 0, 360, nosColor, nosColor, 32, 1, false)
    			end
    		end
        end
    end
    addEventHandler("onClientRender", root, drawSpeedo)

    I dont test it but i think is cool xD

  2. 6 minutes ago, IIYAMA said:

    so in theory i can call the client use ProcessLineOfSight and return it to the server, but i will try another efficient way.

  3. I have a problem with blocked files, i cant use blocked files for replace model i dont known why but only blocked files give me error >-<

    i will try all the form you give us to repair my problem thanks :3

  4. 15 hours ago, Erknneto said:

    You're using a non-compatible model for the weapons, try to use another models. It might work.

    yeah i think that is the firts place but i test many and maaany models but nothing work, maybe there are only compatible with weapon models ?

  5. Any way to repair the error of the next image? ( You can see how the replaced weapon doesnt charge properly and only appears as a shot )

    happens when he replaced a normal mapping model with a weapon (  I clarify that only happens with some weapons  )

    8s22mnG.png

  6. 17 hours ago, Mr.Loki said:

    this model was made for replacing the default weapon models not sure it would work with replacing other models

    Many weapons work, the only weapons that doesnt work are locked, dont known why, but ifthere isnt any solution no problem xD

  7. 14 minutes ago, Mr.Loki said:

    Can you explain better of what you're trying to do?

    If it's an ID problem then you can use this to get object IDs that aren't used so replaced objects aren't overlapped in your code.

    the id isnt the problem xD i tried to use a custom object and happen what you see in the photo.

  8. what can I do if, when replacing a DFF, the object transforms into the next thing ( You can see the item in the ped hand like a "fire" )

    I have assumed that only happens with blocked DFFs, there is a solution without having to unlock the DFF ??

    ( i talk to the creator of the mod and the stupid only think that I want to steal the mod  )

    8s22mnG.png

  9. I wanted to know if there is a way to prevent players from using this client option on my server, since I have some very smart users use that option to disable some disadvantages in the server like textures or shaders that creates a lot of disadvantage between some players and others .. because obviously there are players who play legally.

    With the debug setting option I mean this that you can see in the photo.

    B4pBKSa.png

  10. Queria informarme si hay alguna forma de evitar que los jugadores usen esta opcion del cliente en el servidor, ya que como tengo unos usuarios muy inteligentes y algo tramposillos usan esa opcion para desactivar varias desventajas en el servidor como texturas o shaders y la verdad es un poco pesado que por una opcion extra que tiene el cliente se cree un desbalance entre unos jugadores y otros.. porque obviamente siempre existe gente que juega legal.

    Con la opcion de "Debug Setting" me refiero a esto que podran ver en la foto la cual tampoco me deja insertar asi que dejo el link y ya.

    https://imgur.com/a/ApNAxnJ

  11. Se que esto lo hice muchas veces pero no me acuerdo de como hacerlo ahora mismo si dentro del a siguiente tabla solo quiero editar la "armadura" del jugador como hago para acceder solo a ese dato sin afectar al skin y la vida

    setElementData( jugador, "EstadoJugador", { skin = 2 , vida = 100 , armadura = 0  } )

     

  12. My users have some problems update the MTA, i update my server to 1.5.5-13846 but if a player want to enter the MTA dont update the client and the https://mtasa.com/   dont have the last version so players cant enter, some players and me download the latest version in nightly.. but not all players know how to do it.

  13. Te falta un - en la posicion x de la segunda puerta, si no me equivoco son dos puertas cerca del hospital de fort carson, la segunda puerta es la del hospital que con el - aparece al lado y si le quitar el negativo pues se va la cantera xD

    • Thanks 1
×
×
  • Create New...