Drakath Posted March 14, 2012 Posted March 14, 2012 Is there a resource that make players don't damage other players?
0 Jaysds1 Posted March 14, 2012 Posted March 14, 2012 You could create one using your scripting knowledge...
0 Drakath Posted March 15, 2012 Author Posted March 15, 2012 for index, theTeam in ipairs(allTeams) do setTeamFriendlyFire ( theTeam, true ) end end
0 J.S. Posted March 16, 2012 Posted March 16, 2012 Is 'allTeams' defined somewhere? And what event is this triggered by?
0 Drakath Posted March 26, 2012 Author Posted March 26, 2012 I don't know. Can someone make the code to enable friendly fire for all?
0 Castillo Posted March 26, 2012 Posted March 26, 2012 addEventHandler ( "onResourceStart", resourceRoot, function ( ) local allTeams = getElementsByType ( "team" ) for index, theTeam in ipairs ( allTeams ) do setTeamFriendlyFire ( theTeam, false ) end end )
0 Drakath Posted June 27, 2012 Author Posted June 27, 2012 But how can I make friendly fire off for everyone without any teams?
0 Jaysds1 Posted June 28, 2012 Posted June 28, 2012 like this: addEventHandler("onResourceStart",resourceRoot,function() createTeam("Default") end) addEventHandler("onPlayerJoin",root,function() setPlayerTeam(source,getTeamFromName("Default")) end)
0 Drakath Posted June 28, 2012 Author Posted June 28, 2012 This script you gave me doesn't work. It only works when player joins but when he logs in the team is gone...
0 Jaysds1 Posted June 28, 2012 Posted June 28, 2012 Sorry, but we shouldn't be creating these scripts for you, use onPlayerLogin so, when they login, you could set their team to the default team.
0 Drakath Posted June 28, 2012 Author Posted June 28, 2012 I am using "onPlayerLogin" but it steal doesn't work. There is no players in this team...
0 Drakath Posted June 28, 2012 Author Posted June 28, 2012 addEventHandler("onResourceStart",resourceRoot,function() createTeam("All") end) addEventHandler("onPlayerLogin",root,function() setPlayerTeam(source,getTeamFromName("All")) end)
0 Jaysds1 Posted June 28, 2012 Posted June 28, 2012 (edited) That's all your script? well, try this: addEventHandler("onResourceStart",resourceRoot,function() teamAll= createTeam("All") end) addEventHandler("onPlayerLogin",root,function() setPlayerTeam(source,teamAll) end) Edited June 28, 2012 by Guest
0 Drakath Posted June 28, 2012 Author Posted June 28, 2012 > type="script" author="Drakath" name="Anti-Kill" version="1.0.0" /> ="team.lua" type="server" />>
Question
Drakath
Is there a resource that make players don't damage other players?
32 answers to this question
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