5150 Posted September 20, 2015 Posted September 20, 2015 how can i save the teams when i restart my server? is there a certain script? also, how can i save player money on server restart? its kind of important for my server Paid Roleplay Mapper/Server Management - Message on forums or Discord for info Fluent with Owlgaming Code. Discord message for paid full set-ups and help My Discord: 5150#5150 (or .5150) Monky Gaming Roleplay/Adventure Discord (English players and servers interested in collaborating or partnering message me) https://discord.gg/SFBUHknpxy
5150 Posted September 20, 2015 Author Posted September 20, 2015 i have this but it doesnt save when y server restarts. maybe i did something wrong? Paid Roleplay Mapper/Server Management - Message on forums or Discord for info Fluent with Owlgaming Code. Discord message for paid full set-ups and help My Discord: 5150#5150 (or .5150) Monky Gaming Roleplay/Adventure Discord (English players and servers interested in collaborating or partnering message me) https://discord.gg/SFBUHknpxy
KariiiM Posted September 20, 2015 Posted September 20, 2015 Here you go, i did this part for you it will get the player's team if the resource stopped , now you have to get the element data to your code function saveTeam() for index, vTeam in pairs(getElementsByType("player")) do if (getPlayerTeam(vTeam)) then local aTeam = getTeamName(getPlayerTeam(vTeam)) setElementData(vTeam,"setTeam",tostring(aTeam)) end end end addEventHandler("onResourceStop", getRootElement(),saveTeam)
5150 Posted September 20, 2015 Author Posted September 20, 2015 no guys i mean, when i restart the server, all teams are deleted from my server. like, i have the staff team, then restart and staff team is deleted Paid Roleplay Mapper/Server Management - Message on forums or Discord for info Fluent with Owlgaming Code. Discord message for paid full set-ups and help My Discord: 5150#5150 (or .5150) Monky Gaming Roleplay/Adventure Discord (English players and servers interested in collaborating or partnering message me) https://discord.gg/SFBUHknpxy
KariiiM Posted September 20, 2015 Posted September 20, 2015 AH, so you've to add your resource name in the mtaserver.conf
JR10 Posted September 20, 2015 Posted September 20, 2015 If you're creating the teams with the admin panel, then you'll need a different way to save the teams, like SQL. If you're creating the teams with the functions, then simply starting the resource will create the teams. 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
5150 Posted September 20, 2015 Author Posted September 20, 2015 thanks guys Paid Roleplay Mapper/Server Management - Message on forums or Discord for info Fluent with Owlgaming Code. Discord message for paid full set-ups and help My Discord: 5150#5150 (or .5150) Monky Gaming Roleplay/Adventure Discord (English players and servers interested in collaborating or partnering message me) https://discord.gg/SFBUHknpxy
Mario222 Posted May 13, 2021 Posted May 13, 2021 How to configure the admin panel so that the teams are not deleted when the server is restarted and save the teams in sql?
Moderators Tut Posted May 13, 2021 Moderators Posted May 13, 2021 As this thread is showing its age, I've applied a lock. If you require any more help, please create a new thread so that you can get the custom help you need. Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime - Lao Tzu
Recommended Posts