Drakath Posted March 14, 2012 Share Posted March 14, 2012 Is there a resource that make players don't damage other players? Link to comment
0 Jaysds1 Posted March 14, 2012 Share Posted March 14, 2012 You could create one using your scripting knowledge... Link to comment
0 JR10 Posted March 15, 2012 Share Posted March 15, 2012 Then learn: https://wiki.multitheftauto.com/ Link to comment
0 Drakath Posted March 15, 2012 Author Share Posted March 15, 2012 I can't get it to work help... Link to comment
0 Drakath Posted March 15, 2012 Author Share Posted March 15, 2012 for index, theTeam in ipairs(allTeams) do setTeamFriendlyFire ( theTeam, true ) end end Link to comment
0 J.S. Posted March 16, 2012 Share Posted March 16, 2012 Is 'allTeams' defined somewhere? And what event is this triggered by? Link to comment
0 Drakath Posted March 26, 2012 Author Share Posted March 26, 2012 I don't know. Can someone make the code to enable friendly fire for all? Link to comment
0 Castillo Posted March 26, 2012 Share Posted March 26, 2012 addEventHandler ( "onResourceStart", resourceRoot, function ( ) local allTeams = getElementsByType ( "team" ) for index, theTeam in ipairs ( allTeams ) do setTeamFriendlyFire ( theTeam, false ) end end ) Link to comment
0 Drakath Posted March 28, 2012 Author Share Posted March 28, 2012 Okay, it worked thanks Link to comment
0 Drakath Posted June 27, 2012 Author Share Posted June 27, 2012 But how can I make friendly fire off for everyone without any teams? Link to comment
0 Jaysds1 Posted June 27, 2012 Share Posted June 27, 2012 you could make them spawn on a default team. Link to comment
0 Jaysds1 Posted June 28, 2012 Share Posted June 28, 2012 like this: addEventHandler("onResourceStart",resourceRoot,function() createTeam("Default") end) addEventHandler("onPlayerJoin",root,function() setPlayerTeam(source,getTeamFromName("Default")) end) Link to comment
0 Drakath Posted June 28, 2012 Author Share 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... Link to comment
0 Jaysds1 Posted June 28, 2012 Share 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. Link to comment
0 Drakath Posted June 28, 2012 Author Share Posted June 28, 2012 I am using "onPlayerLogin" but it steal doesn't work. There is no players in this team... Link to comment
0 Jaysds1 Posted June 28, 2012 Share Posted June 28, 2012 ok, can you post me your script please Link to comment
0 Drakath Posted June 28, 2012 Author Share Posted June 28, 2012 addEventHandler("onResourceStart",resourceRoot,function() createTeam("All") end) addEventHandler("onPlayerLogin",root,function() setPlayerTeam(source,getTeamFromName("All")) end) Link to comment
0 Jaysds1 Posted June 28, 2012 Share 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 Link to comment
0 Drakath Posted June 28, 2012 Author Share Posted June 28, 2012 Still doesn't work... Link to comment
0 Jaysds1 Posted June 28, 2012 Share Posted June 28, 2012 are you putting the script on the server-side? Link to comment
0 Jaysds1 Posted June 28, 2012 Share Posted June 28, 2012 Can you post the meta.xml here using Link to comment
0 Drakath Posted June 28, 2012 Author Share Posted June 28, 2012 > type="script" author="Drakath" name="Anti-Kill" version="1.0.0" /> ="team.lua" type="server" />> Link to comment
Question
Drakath
Is there a resource that make players don't damage other players?
Link to comment
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