ESTE ES EL CLIENT
local x,y = guiGetScreenSize()
-- {"NAME",currentweapon_ID,weaponslot,magazineName}, --
weapons ={
{"M4A3 CCO",1,5,""},
{"Compound Crossbow",1,5,""},
{"M4A03 cammo",1,5,""},
{"M107",1,5,""},
{"RPK",1,5,""},
{"AUG",1,5,""},
{"M16A4",1,5,""},
{"FN SCAR-H",1,5,""},
{"Commando",1,5,""},
{"M39EMR",1,5,""},
{"MKB42",1,5,""},
{"RU-556",1,5,""},
{"Famas",1,5,""},
{"DSR50",1,6,""},
{"SVD Dragunov",1,6,""},
{"CZ 550",1,6,""},
{"Remington 870",1,3,""},
{"SPAZ-12 Combat Shotgun",1,3,""},
{"Escopeta Recortada",1,3,""},
{"AKS-74 Kobra",1,5,""},
{"M14 AIM",1,6,""},
-------Secondary Wealpon-----------------
{"Heat-Seeking RPG",2,7,""},
{"M136 Rocket Launcher",2,7,""},
{"Makarov PM",2,2,""},
{"M9 SD",2,2,""},
{"PDW",2,4,""},
{"MP5A5",2,4,""},
{"Revólver",2,2,""},
{"Cuchillo",2,1,""},
{"Hacha",2,1,""},
{"Bate",2,1,""},
{"Pala",2,1,""},
{"Palo de Golf",2,1,""},
-----------Special wealpon---------
{"Paracaídas",3,11,""},
{"Bomba de Humo",3,8,""},
{"Granada",3,8,""},
{"Prismáticos",3,9,""},
-------------------------------------------
}
addEventHandler("onClientRender",getRootElement(),function()
local x, y = guiGetScreenSize ( ) posx2= x-55 posy2= 90 posx3= x-55 posy3= 81
local clip = getPedAmmoInClip ( localPlayer )
local total = getPedTotalAmmo ( localPlayer )
local screenWidth,screenHeight = guiGetScreenSize()
local bX, bY = screenWidth/2,screenHeight/2
--dxDrawRectangle ( 0+screenWidth-200, posy3-70, 250, 55, tocolor ( 56, 61, 54,113 ) )
if getPedWeaponSlot(localPlayer) == 0 then
dxDrawText("Puños",screenWidth-248, posy3-68, x, y,tocolor(0,0,0,255),1.4,"default","left","top",false,false,false)
dxDrawText("Puños",screenWidth-250, posy3-70, x, y,tocolor(136,182,72,255),1.4,"default","left","top",false,false,false)
end
for i=1,#weapons do
if weapons[i][1] == getElementData(localPlayer,"currentweapon_"..weapons[i][2]) then
if getPedWeaponSlot(localPlayer) == weapons[i][3] then
dxDrawText(weapons[i][1],screenWidth-249, posy3-68, x, y,tocolor(0,0,0,255),0.8,"bankgothic","left","top",false,false,false)
dxDrawText(weapons[i][1],screenWidth-250, posy3-70, x, y,tocolor(136,182,72,255),0.8,"bankgothic","left","top",false,false,false)
---
dxDrawText(weapons[i][4],screenWidth-209, posy3-48, x, y,tocolor(0,0,0,255),0.8,"bankgothic","left","top",false,false,false)
dxDrawText(weapons[i][4],screenWidth-210, posy3-50, x, y,tocolor(136,182,72,255),0.8,"bankgothic","left","top",false,false,false)
if weapons[i][3] ~= 1 then
dxDrawText(clip.."/"..total,screenWidth-119, posy3-44, x, y,tocolor(0,0,0,255),0.7,"bankgothic","left","top",false,false,false)
dxDrawText(clip.."/"..total,screenWidth-120, posy3-46, x, y,tocolor(136,182,72,255),0.7,"bankgothic","left","top",false,false,false)
end
end
end
end
end)
function quitar ( )
showPlayerHudComponent (source, "weapon", false)
showPlayerHudComponent (source, "ammo", false)
showPlayerHudComponent (source, "clock", false)
setPlayerNametagShowing (source, false )
end
addEventHandler ( "onClientPlayerSpawn", localPlayer, quitar )