Jump to content

Interior problem


OrbTanT

Recommended Posts

I am using the resource "interiors" of the mta, and I would like to take the weapons when the player is within the interiors or not shoot within the same, I thought in this script, I don't know if the correct is put within the script of "interiors" for working.

addEventHandler("onClientRender", root, 
function() 
    local i = getElementInterior(localPlayer) 
    if (i ~= 0) then 
       toggleControl("fire", false) -- desabilita o tiro e o soco 
    else 
       toggleControl("fire", true) 
    end 
end) 

OR if you have other means to remove the weapons and "fire" within the interiors

Link to comment

The script now checks to see if a player is in a different interiors 0, even so is not working.

addEventHandler("onClientPlayerWeaponFire", root, 
function() 
    local i = getElementInterior(localPlayer) 
    if (i ~= 0) then 
       toggleControl("fire", false) -- desabilita o tiro e o soco 
    else 
       toggleControl("fire", true) 
    end 
end) 

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