Multi Posted May 30, 2014 Share Posted May 30, 2014 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
Den. Posted May 30, 2014 Share Posted May 30, 2014 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
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