Jump to content

[HELP] Weapons


AlfaMTA

Recommended Posts

(sorry for putting this in code, but [lua] is bugged for some reason)

Try this:

 

-- client side (not tested) 
  
  
function isPedAiming ( thePedToCheck ) 
    if isElement(thePedToCheck) then 
        if getElementType(thePedToCheck) == "player" or getElementType(thePedToCheck) == "ped" then 
            if getPedTask(thePedToCheck, "secondary", 0) == "TASK_SIMPLE_USE_GUN" then 
                return true 
            end 
        end 
    end 
    return false 
end 
  
function checkAim() 
    if not isPedAiming(localPlayer) then 
        toggleControl( "fire", false) 
    else 
        toggleControl( "fire", true) 
    end 
end 
addEventHandler ( "onClientResourceStart", getRootElement(), checkAim ) 

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