Jump to content

[HELP] Trying to do bullet proof skin


Recommended Posts

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 );

 

Link to comment
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 ) ; 

 

Link to comment

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

 

  • Thanks 1
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...