Klesh Posted May 9, 2011 Posted May 9, 2011 I was reading on wiki.mta about friendly fire teams but the code on wiki no works; addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function () local allTeams = getElementsByType ( "team" ) for index, theTeam in ipairs(allTeams) do setTeamFriendlyFire ( theTeam, false ) end end) Thanks for Any help. My resources : playerpartFromName: Exported function.
Moderators Zango Posted May 9, 2011 Moderators Posted May 9, 2011 Could it be the teams are not created prior to this?
Klesh Posted May 9, 2011 Author Posted May 9, 2011 The Teams are created, but i put the scrip on folder with meta and that, but nothing. And im trying to do no only a friendlyfire for team, for any player, i mean any player cant kill another player. My resources : playerpartFromName: Exported function.
Castillo Posted May 9, 2011 Posted May 9, 2011 Disable the friendly fire for every team? team1 = createTeam(text,r,g,b) setTeamFriendlyFire(team1,false) I had problems in the past setting for all the teams. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Klesh Posted May 10, 2011 Author Posted May 10, 2011 You mean a script with this? friendlyfire.lua? i was do, but not works and the are created in the server with a gamemode. Thanks for any help. My resources : playerpartFromName: Exported function.
Klesh Posted May 10, 2011 Author Posted May 10, 2011 Some help? Because in the wiki, the script no works. My resources : playerpartFromName: Exported function.
Klesh Posted May 10, 2011 Author Posted May 10, 2011 The Friendly cant be true right, becuase this desactivates, i try all but nothing work, some help about how can disable friendly for all, any player cant damage another one. Thanks for any help. My resources : playerpartFromName: Exported function.
Castillo Posted May 10, 2011 Posted May 10, 2011 DON'T TRIPLE-POST!! Post your code here. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Klesh Posted May 10, 2011 Author Posted May 10, 2011 Sorry for Spam. The code is the same from wiki. addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function () local allTeams = getElementsByType ( "team" ) for index, theTeam in ipairs(allTeams) do setTeamFriendlyFire ( theTeam, false ) end end) Teams created by a gamemode. Citizens Private Corp. [s.T.A.R.S] Girls Tested, doesn t works! My resources : playerpartFromName: Exported function.
Castillo Posted May 10, 2011 Posted May 10, 2011 Post your team's code . San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Klesh Posted May 10, 2011 Author Posted May 10, 2011 (edited) Team Code is in Cdm.map Code deleted. Edited May 10, 2011 by Guest My resources : playerpartFromName: Exported function.
Castillo Posted May 10, 2011 Posted May 10, 2011 That's a map file, i'm asking for the SCRIPT, do you get me? what gamemode are you using btw? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Klesh Posted May 10, 2011 Author Posted May 10, 2011 Like i say before only i try with the script of wiki because is the tutorial -.-. Im using CDM for it. My resources : playerpartFromName: Exported function.
Castillo Posted May 10, 2011 Posted May 10, 2011 Post the script part where it creates the teams. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Klesh Posted May 10, 2011 Author Posted May 10, 2011 Citizens = createTeam(text,r,g,b) [S.T.A.R.S] = createTeam(text,r,g,b) Private Corp = createTeam(text,r,g,b) Girls = createTeam(text,r,g,b) setTeamFriendlyFire(citizens,false) setTeamFriendlyFire([S.T.A.R.S],false) setTeamFriendlyFire(Private Corp,false) setTeamFriendlyFire(Girls,false) end) There is one, but the problem is how to enable for all friendly fire nobody cant kill another. My resources : playerpartFromName: Exported function.
Moderators Zango Posted May 11, 2011 Moderators Posted May 11, 2011 Oh you want to enable friendly fire for all teams? addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function () local allTeams = getElementsByType ( "team" ) for index, theTeam in ipairs(allTeams) do setTeamFriendlyFire ( theTeam, true ) end end)
Klesh Posted May 11, 2011 Author Posted May 11, 2011 Yes i will test the code. Thanks for your help. My resources : playerpartFromName: Exported function.
karlis Posted May 12, 2011 Posted May 12, 2011 Citizens = createTeam(text,r,g,b) [S.T.A.R.S] = createTeam(text,r,g,b) Private Corp = createTeam(text,r,g,b) Girls = createTeam(text,r,g,b) setTeamFriendlyFire(citizens,false) setTeamFriendlyFire([S.T.A.R.S],false) setTeamFriendlyFire(Private Corp,false) setTeamFriendlyFire(Girls,false) end) i found 7 syntax errors here, you should reread wiki. [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
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