Jump to content

[HELP] Custom Weapon Names - HUD


Recommended Posts

Hello, everyone!

Can we help me to add custom weapon names, in the hud?

Original name > Custom name : ID

M4 > M4A1 - ID:356

AK47 > AK-47 ACOG GL - ID:355

MP5 > BIZON SD - ID:353

MICRO UZI > PDW - ID:352

SILENCED > MAKAROV PM - ID:347

COLT > M1911 - ID:346

DEAGLE > REVOLVER - ID:348

SHOTGUN > WINCHESTER 1866 - ID:349

SPAZ 12 > REMINGTON 870 - ID:351

RIFLE > CZ 550 - ID:357

SNIPER > SVD CAMO - ID:358

Code:

function speed ( ) 
    addEventHandler ( "onClientRender", root, getspeed ) 
end 
addEventHandler ("onClientVehicleEnter", root, speed) 
  
function wylacz ( ) 
    removeEventHandler ( "onClientRender", root, getspeed ) 
end 
addEventHandler("onClientVehicleExit", root, wylacz) 
  
function hud ( ) 
    local x, y = guiGetScreenSize() 
    ammo = getPedTotalAmmo ( getLocalPlayer() ) 
    clip = getPedAmmoInClip ( getLocalPlayer() ) 
    weaponID = getPedWeapon(getLocalPlayer()) 
    dxDrawText("#11A737  "..clip.."|"..ammo,x-(x/6.3), y/08, x, y,tocolor(0,255,255,255),1.5,"clear","left","top",true,false,false,true) 
    if isPedInVehicle (localPlayer) == false then return end 
end 
addEventHandler("onClientRender",getRootElement(),hud) 
addEventHandler("onClientPlayerSpawn",getRootElement(),hud) 
  
function quitar ( ) 
    showPlayerHudComponent ( "weapon", false ) 
    showPlayerHudComponent ( "ammo", false) 
    showPlayerHudComponent ( "wanted", false ) 
    showPlayerHudComponent ( "crosshair", true ) 
end 
addEventHandler ( "onClientPlayerSpawn", localPlayer, quitar ) 

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...