Perfect Posted April 7, 2012 Share Posted April 7, 2012 Hi all i make godmode resource and scripting working fine but players can kill with knife ? Link to comment
X-SHADOW Posted April 7, 2012 Share Posted April 7, 2012 ClientSide--- function stop ( attacker, weapon, bodypart ) if ( weapon == 4 ) then cancelEvent() outputChatBox('You Can,t Kill With Knife',source,255,255,0) end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stop ) Link to comment
Kenix Posted April 7, 2012 Share Posted April 7, 2012 addEventHandler ( 'onClientPlayerDamage', localPlayer, function( _, nWeapon ) if nWeapon == 4 then cancelEvent( ) end end ) Link to comment
arezu Posted April 7, 2012 Share Posted April 7, 2012 addEventHandler ( 'onClientPlayerDamage', localPlayer, function( _, nWeapon ) if nWeapon == 4 then cancelEvent( ) end end ) The guy above you posted the same thing... Link to comment
Kenix Posted April 7, 2012 Share Posted April 7, 2012 No It's incorrect outputChatBox('You Can,t Kill With Knife',source,255,255,0) Because arguments is bool outputChatBox ( string text [, int r=255, int g=255, int b=255, bool colorCoded=false ] ) Link to comment
Perfect Posted April 7, 2012 Author Share Posted April 7, 2012 thnx guy's for help me Link to comment
Castillo Posted April 7, 2012 Share Posted April 7, 2012 You may also want to disable the stealth kills with the Knife, you can cancel the event onClientPlayerStealthKill if the weapon is the Knife. 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