Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:saveserver(playerid, params[])
- {
- if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
- if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- print("** Saving Users... **");
- foreach(Player, i)
- {
- if(IsPlayerLoggedIn(i))
- {
- SaveChar(i);
- SaveBank(i);
- }
- }
- for(new idx = 1; idx < sizeof(HouseInfo); idx++)//Loops through the houses.
- {
- if(!HouseInfo[idx][hLevel])
- {
- print("Houses saved successfully.");
- break;//Breaks the loop if the price is 0(Meaning it doesn't exist)
- }
- SaveHouses(idx);
- }
- for(new idx = 1; idx < sizeof(BizInfo); idx++)//Loops through the businesses.
- {
- if(!BizInfo[idx][bType])
- {
- print("Business saved successfully.");
- break;//Breaks the loop if the price is 0(Meaning it doesn't exist)
- }
- SaveBiz(idx);
- }
- //SaveFamilies();
- SavePoints();
- SaveDoors();
- SaveGates();
- SaveFactions();
- SaveCams();
- SaveGarages();
- SaveMapIcons();
- SaveArrestPoint();
- SaveDoors();
- SaveDrugs();
- SaveMOTDS();
- SaveProducts();
- SaveObjects();
- SaveObjects22();
- SavegObjects();
- SaveObjects22g();
- new string[128];
- format(string, sizeof(string), "AdmWarn: %s has saved all server files.", RPN(playerid));
- SendAdminMessage(COLOR_DARKRED, 1, string);
- print("** All users files has been saved **");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment