Jump to content

Question


xeon17

Recommended Posts

Posted

this ?

addEventHandler("onPlayerDamage", root, 
function ( player ) 
if ( getElementInterior( player ) then 
cancelEvent() 
end 

Posted
addEventHandler("onPlayerDamage", root, 
function ( player ) 
if ( getElementInterior( player ) ) then 
cancelEvent() 
end 
end) 

Posted

onPlayerDamage - Canceling this event has no effect. Cancel the client-side event onClientPlayerDamage instead.

+ that if statement will always get executed as the getElementInterior function returns an integer (which is ≠ nil or false).

Posted
addEventHandler("onClientPlayerDamage", root, function(player) 
    if (getElementInterior(player) > 0) then 
    cancelEvent() 
end 
end) 

The above code should work, run it client side.

Posted

No work , when player enter an interior he still can use his weapons.. i want just he can't shot. tried to take his weapon , it worked really bad.

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...