PatrykPro Posted June 14, 2014 Share Posted June 14, 2014 Welcome. How I could block fire and aiming keys in interiors? I'm just getting invisible bug, when a player dies in interior and a player needs to /reconnect to fix that. Or... Maybe somebody knows, how to fix this bug? Thanks for every answer. Link to comment
qaisjp Posted June 14, 2014 Share Posted June 14, 2014 To fix the issue, you should just do setElementInterior(player, 0) But to disable it altogether, you can do: toggleControl Link to comment
PatrykPro Posted June 14, 2014 Author Share Posted June 14, 2014 Thank you. I'll edit CDM code and I'll check this. EDIT: Nothing happened, or I edited it wrong. Video with my problem: http://youtu.be/jAbBmaH1I0Y Link to comment
MIKI785 Posted June 14, 2014 Share Posted June 14, 2014 That's strange, because spawnPlayer sets interior to 0 by default, i don't think that the script would spawn it wrong. Try this: addEventHandler("onPlayerSpawn", root, function () setElementInterior(source, 0) end) To make sure that it's 0. Link to comment
PatrykPro Posted June 17, 2014 Author Share Posted June 17, 2014 MIKI1785: Still same problem. Anyway it's a 0 interior and still this bug. http://oi58.tinypic.com/194kyp.jpg Link to comment
Gtagasje Posted June 17, 2014 Share Posted June 17, 2014 If you want to disable damage in interiors you can just use these: "onClientPlayerDamage" -- Triggers when a player is damaged getElementInterior() -- Check if the player is in an interior or outside(interior 0) cancelEvent() -- If yes, cancel the damage Make sure this script is clientside. Link to comment
PatrykPro Posted June 18, 2014 Author Share Posted June 18, 2014 What I must do? I'm too weak to script anything. D: Link to comment
ADCX Posted June 18, 2014 Share Posted June 18, 2014 function fncClientPlayerDamage() if not (getElementInterior(source) == 0) then cancelEvent() end end addEventHandler("onClientPlayerDamage",getRootElement(),fncClientPlayerDamage() Add this to your client script. This will cancel out every damage done to a player inside an interior. Link to comment
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