Jump to content

fire


Multi

Recommended Posts

Hell i want do a script that when player fire using chainsaw id = 9 then on chat will show message "cos", but it's not working, help. Debug = nothing

bindKey("fire", "down", function(player) 
if ( player == localPlayer ) then 
if getPedWeapon (player, 9 ) then 
outputChatBox("cos") 
end 
end 
end 
) 

Link to comment

Try this. (client side)

bindKey("fire", "down", function() 
    if getPedWeapon(localPlayer) == 9 then --Get the player's weapon, and see if it is a chainsaw. 
        outputChatBox("Cos") 
    end 
end) 

Your problem was that you were misusing the function getPedWeapon, and not checking if the weapon is a chainsaw.

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