Perfect Posted April 7, 2012 Posted April 7, 2012 Hi all i make godmode resource and scripting working fine but players can kill with knife ?
X-SHADOW Posted April 7, 2012 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 )
Kenix Posted April 7, 2012 Posted April 7, 2012 addEventHandler ( 'onClientPlayerDamage', localPlayer, function( _, nWeapon ) if nWeapon == 4 then cancelEvent( ) end end )
arezu Posted April 7, 2012 Posted April 7, 2012 addEventHandler ( 'onClientPlayerDamage', localPlayer, function( _, nWeapon ) if nWeapon == 4 then cancelEvent( ) end end ) The guy above you posted the same thing...
Kenix Posted April 7, 2012 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 ] )
Castillo Posted April 7, 2012 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.
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