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... My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
0 JR10 Posted March 15, 2012 Posted March 15, 2012 Then learn: https://wiki.multitheftauto.com/ Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
0 JR10 Posted March 15, 2012 Posted March 15, 2012 Post the script. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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? Kinetic Roleplay Forums || Mantis || YouTube
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 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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 27, 2012 Posted June 27, 2012 you could make them spawn on a default team. My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
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) My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
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. My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
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 Jaysds1 Posted June 28, 2012 Posted June 28, 2012 ok, can you post me your script please My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
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 My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
0 Jaysds1 Posted June 28, 2012 Posted June 28, 2012 are you putting the script on the server-side? My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
0 Jaysds1 Posted June 28, 2012 Posted June 28, 2012 Can you post the meta.xml here using My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
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