Trust aka Tiffergan Posted May 9, 2020 Posted May 9, 2020 Hello so as you can see in topic, I trying to do bullet proof skin and i was trying something like this but it not working function dmg ( attacker ) skin = getPedSkin(localPlayer) if skin == 285 cancelEvent() end addEventHandler ( "onClientDamage", getRootElement(), dmg )
-Ilker. Posted May 9, 2020 Posted May 9, 2020 (edited) addEventHandler("onClientPlayerDamage",root,function() if ( getElementModel ( source ) == 285 ) then cancelEvent() end end ); Edited May 9, 2020 by -Ilker.
Trust aka Tiffergan Posted May 9, 2020 Author Posted May 9, 2020 Not working and there is no erros in DB video if you not belive https://streamable.com/7uiygz
Trust aka Tiffergan Posted May 9, 2020 Author Posted May 9, 2020 3 minutes ago, -Ilker. said: Client side ?? yes client side but maybe i did something wrong look all c-side function informPlayerOnModelChange(oldModel, newModel) if ( getElementType(source) == "player" ) then skin = getPedSkin(localPlayer) if skin == 285 setPedWalkingStyle(localPlayer,59) else setPedWalkingStyle(localPlayer,0) end end end addEventHandler("onClientElementModelChange", root, informPlayerOnModelChange) addEventHandler("onClientPlayerDamagr",root,function() if ( getElementModel ( source ) == 285 ) then cancelEvent() end end );
-Ilker. Posted May 9, 2020 Posted May 9, 2020 addEventHandler ( "onClientElementModelChange" , root , function ( _ , newSkin ) if ( getElementType ( source ) == "player" ) then setPedWalkingStyle ( source , newSkin == 285 and 59 or 0 ) end end ) ; addEventHandler ( "onClientPlayerDamage" , root , function ( ) if ( getElementModel ( source ) == 285 ) then cancelEvent ( ) ; end end ) ;
Tekken Posted May 9, 2020 Posted May 9, 2020 I assume you are using dayz gamemode so you will find an event in the client side that manages the blod loss so all you hace to do is to put this at the very top of the event just after cancelEvent() If getElementModel(source) == 285 then return; end if getElementModel(source) == 285 then return; end 1
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