Jump to content

[Help] Show Image in time to reload the gun !


MrBugsFive

Recommended Posts

Hello

All, I wanted a Help to Make a System to see a zoomed image:

when you have almost finished the bullet in the magazine

Example: to 5/100 with Ammo there to appear this image:

roll.png?1424817100

or this:

items.png?1424817166

And When Press R to reload the weapon the image disappears.

Does it have to do this ?? :?:

Thanks You By Help My. ! :D

Link to comment

Code With Imagens:

  
local screenW, screenH = guiGetScreenSize() 
  
local LOCAL_PLAYER = getLocalPlayer() 
pos = getElementPosition(LOCAL_PLAYER) 
showPlayerHudComponent("radar", false) 
  
    showPlayerHudComponent ( "ammo", true ) 
    showPlayerHudComponent ( "area_name", true ) 
    showPlayerHudComponent ( "amour", true )     
    showPlayerHudComponent ( "breath", true ) 
    showPlayerHudComponent ( "clock", true ) 
    showPlayerHudComponent ( "health", true ) 
    showPlayerHudComponent ( "money", true )     
    showPlayerHudComponent ( "radar", true ) 
    showPlayerHudComponent ( "vehicle_name", true ) 
    showPlayerHudComponent ( "radio", true ) 
    showPlayerHudComponent ( "weapon", true ) 
    showPlayerHudComponent ( "wanted", true ) 
  
     
addEventHandler("onClientRender", root, 
    function() 
      local playerX, playerY, playerZ = getElementPosition(LOCAL_PLAYER) 
      local playerZoneName = getZoneName(playerX, playerY, playerZ) 
      local ammo = getPlayerAmmoInClip(LOCAL_PLAYER) 
      local ammo2 = getPlayerTotalAmmo(LOCAL_PLAYER) 
    --local TA = getPlayerTotalAmmo(thePlayer))      
       dxDrawImage(screenW * 0.4817, screenH * 0.3268, screenW * 0.0586, screenH * 0.1042, "roll.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) 
       dxDrawText("Press 'R' Reload Weapon !", screenW * 0.4612, screenH * 0.2982, screenW * 0.5630, screenH * 0.3268, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
       dxDrawText("You Ammo: ".. ammo .." | ".. ammo2 .."", screenW * 0.5220, screenH * 0.4219, screenW * 0.6698, screenH * 0.4492, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
    end 
) 
  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...