DarkMagic Posted July 1, 2018 Share Posted July 1, 2018 Hi guys! I want to make a script ,like this : If for example a M4 is in my hand , then an m4 image appears . But it's not working The script : local x,y = guiGetScreenSize() local oX, oY = 1920, 1080 function weaponRender () local weapon = getPedWeapon(localPlayer) if weapon == 356 then dxDrawImage(1650/oX*x, 120/oY*y, 250, 200, "guns/0.png", 0, 0, 0, tocolor(255, 255, 200, 255)) end end addEventHandler("onClientRender", root, weaponRender) Link to comment
Galactix Posted July 1, 2018 Share Posted July 1, 2018 16 minutes ago, DarkMagic said: if weapon == 356 then There is no such weapon ID in MTA. M4 ID would be 31. 1 Link to comment
DarkMagic Posted July 1, 2018 Author Share Posted July 1, 2018 Ohhh . Thank u , It' s working now Link to comment
Galactix Posted July 1, 2018 Share Posted July 1, 2018 1 minute ago, DarkMagic said: Ohhh . Thank u , It' s working now You're welcome Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now