pepsi18 Posted April 9, 2014 Share Posted April 9, 2014 what is the problem works well but after a while it stops working and I must restart the scrip function protect() for i, TEAMS in ipairs ( getElementsByType("team") ) do if ( getTeamFriendlyFire ( TEAMS ) == true ) then setTeamFriendlyFire ( TEAMS, false ) end end end addEventHandler("onResourceStart", resourceRoot, protect) Link to comment
monumento Posted April 9, 2014 Share Posted April 9, 2014 Make a timer. In your code protect function will be executed one-time when you start resource. setTimer 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