Laura Posted February 24, 2014 Share Posted February 24, 2014 Hello everyone. I require some help with an issue i am having with my Server. i'm a complete noob at scripting i don't know how to do it most of my scripts were downloaded I actually created my own script yesterday and it actually worked with the help of a youtube video my script was a basic Replace Skin script i was really happy Info you need to know so that you can actually help understand the problem i am having and maybe help me with it. My server is a MTA:SA DayZ server. The server works fine and plays fine without any issues. Problems: My problems are the Teams. Problem #1: I'm not sure if its because of the server type "dayz" or not but on the scoreboard there is Teams. the Teams include Player and Zombies. now in my admin panel using "p" i need to select a player to "Set the team" So i set my team to Zombies and i am moved to the zombie team. then i Type /reconnect. and im back onto the player team. so each time i connect or a player connects i have to set their team. Question #1: how do i make it so that when i set their team they automatically get placed into that team. Problem #2: When i delete the Team Zombies / Player. The teams are deleted. but when i restart the server the teams are back. they do not delete perminatly. Question #2: How do i Delete a team and save it so the teams are permanently deleted. Problem #3: When i create a Team so that there are 3 Teams. Zombies, Player, TestTeam. it shows all 3 team in the scoreboard. i can then set people to the TestTeam. remove people etc. but yet again when i restart the server, the teams are gone exsept Player and Zombies. Question #3: How to i Create a team and save it so it's permanent. Things i have done to try to resolve the problem. I have downloaded an AutoTeams script and that did not even create a team or work even though i added the teams in the Config.xml and everything i was told to do for it to work. but it did not work. > Faild. i have opened my admin panel and have gone to the Resource Scoreboard and doubleclicked it. i have 4 options. i can hide forcehide the team. when i force hide the team they are hidden, but the team colors are still on the scoreboard just no teams. luckily the Player and Zombies Team color are very close to white so it hard to tell. I have also tried to Open the Scoreboard's files "Lua" to try find where the teams are i could not find them. I have tried to look on the TeamManagers files to find where the teams are. i still could not find them. It's like there are no teams but there are teams. What i need is someone to tell me how to Delete the teams permanently and create Teams permanently and been able to set people to those teams permanently so that i can add 1 team called Staff or Admins etc and all my Staff member will log in and people will know they are Admins. I think that the teams are like set in the DayZ files but i do not know where and the files are "Lua_Dayz" which i cannot edit. Sorry for such a big post i'm just trying to get you to understand the issue Link to comment
Wei Posted February 24, 2014 Share Posted February 24, 2014 Answer #1: You must create your own saving system to save teams. Search for community/forum, there are plenty of savers... Answer #2: You must modify script to prevent creating teams again. Just remove createTeam function so it wont apear again! Answer #3: Just add createTeam("teamname", red, green, blue) to any serversided script Link to comment
Laura Posted February 24, 2014 Author Share Posted February 24, 2014 I downloaded a teamsaver and it does not work. it already had a TestTeam in the xml and when i loaded it the "TestTeam" did not show up on the scoreboard. Where will the current teams be saved? "Zombies and Player"? Link to comment
Wei Posted February 24, 2014 Share Posted February 24, 2014 -- add teams here createTeam("Zombies", 255, 255, 255) createTeam("Players", 123, 123, 123) function onPlayerQuitSaveTeam() local sTeam = getPlayerTeam(source) local sAccount = getPlayerAccount(source) if (sTeam and not isGuestAccount(sAccount)) then setAccountData(sAccount, "team", getTeamName(sTeam)) end end addEventHandler("onPlayerQuit", root, onPlayerQuitSaveTeam) function onPlayerLoginSetTeam(_, curAccount) local pTeam = getAccountData(curAccount, "team") if (pTeam) then if (getTeamFromName(pTeam)) then -- ~~ Just to be sure setPlayerTeam(source, getTeamFromName(pTeam)) end end end addEventHandler("onPlayerLogin", root, onPlayerLoginSetTeam) Try that, didn't test it tho Link to comment
Laura Posted February 24, 2014 Author Share Posted February 24, 2014 Wei, i will try that in a moment. i have found another teamsaver. Which works. https://community.multitheftauto.com/in ... ls&id=8522 I create a team, and set a player to the team. when they reconnect they automatically go to that team. etc. BUT... when i restart server... The team i created was deleted and all the origonal teams "Zombies and Player" are back again so it's like the saver works but only if the server is not restarted. after i restart the server it goes back to origonal data. so i will have to keep making the team, each time i restart. . i can show you via a Livestream if that can help you figure out what my problem is. Link to comment
Wei Posted February 24, 2014 Share Posted February 24, 2014 If you make teams with admin panel teams will be removed when you restart server. You must add it to script so when script starts it will make a teams itself Link to comment
Laura Posted February 25, 2014 Author Share Posted February 25, 2014 Thanks for the help Wei. its working now 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