Xwad Posted December 27, 2014 Share Posted December 27, 2014 Hi is it possible to do that only Teammates can see each other on the map in Classic Death Match gamemode? Its very important for me:D Link to comment
MTA Team ccw Posted December 28, 2014 MTA Team Share Posted December 28, 2014 You are posting these messages in the the wrong place. Moved to community.multitheftauto.com > Scripting Link to comment
Castillo Posted December 28, 2014 Share Posted December 28, 2014 You would need to edit the blips script which is being used by that game mode. Link to comment
ViRuZGamiing Posted December 28, 2014 Share Posted December 28, 2014 https://wiki.multitheftauto.com/wiki/Cr ... AttachedTo https://wiki.multitheftauto.com/wiki/GetPlayersInTeam Loop through the player his team members and create the blips attached to those players. It think this would work (not tested), Regards Viruz Link to comment
Xwad Posted December 28, 2014 Author Share Posted December 28, 2014 i dont understand this:( i'm bad in scripting. Can you help me on Skype? My Skype name is: Obersovszkyf Link to comment
Xwad Posted December 28, 2014 Author Share Posted December 28, 2014 is it so good? META: SERVER.lua function killTeamFunction ( thePlayer, command, teamName ) -- Find and kill all the players in the team that was specified with the console command local theTeam = getTeamFromName ( teamName ) if ( theTeam ) then local players = getPlayersInTeam ( theTeam ) -- Loop through the player table for playerKey, playerValue in ipairs ( players ) do -- kill the player killPlayer ( playerValue ) end end end addCommandHandler ( "killTeam", killTeamFunction ) CLIENT.lua function showTeamFunction ( command, teamName ) -- Find and show all the players in the team that was specified with the console command local theTeam = getTeamFromName ( teamName ) if ( theTeam ) then local players = getPlayersInTeam ( theTeam ) -- Loop through the player table for playerKey, playerValue in ipairs ( players ) do outputChatBox ( getPlayerName(playerValue) ) end end end addCommandHandler ( "showTeam", showTeamFunction ) Link to comment
MTA Team botder Posted December 29, 2014 MTA Team Share Posted December 29, 2014 Can you please use the [xml][/xml] tags? Link to comment
Xwad Posted December 29, 2014 Author Share Posted December 29, 2014 is it so good? -- get a table with all teams local allTeams = getElementsByType ( "team" ) -- for every team, addEventHandler("onResourceStart", resourceRoot, function () for index, theTeam in ipairs(allTeams) do -- if friendly fire is off, if ( getTeamFriendlyFire ( theTeam ) == false ) then -- switch it on setTeamFriendlyFire ( theTeam, true ) end end) Link to comment
Xwad Posted December 29, 2014 Author Share Posted December 29, 2014 function showTeamFunction ( command, teamName ) -- Find and show all the players in the team that was specified with the console command local theTeam = getTeamFromName ( teamName ) if ( theTeam ) then local players = getPlayersInTeam ( theTeam ) -- Loop through the player table for playerKey, playerValue in ipairs ( players ) do outputChatBox ( getPlayerName(playerValue) ) end end end ?? Link to comment
Xwad Posted December 29, 2014 Author Share Posted December 29, 2014 where must i write the [/lua] and the [lua]? 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