Guest User

Untitled

a guest
Oct 12th, 2015
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. CMD:saveserver(playerid, params[])
  2. {
  3. if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
  4. if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  5. print("** Saving Users... **");
  6. foreach(Player, i)
  7. {
  8. if(IsPlayerLoggedIn(i))
  9. {
  10. SaveChar(i);
  11. SaveBank(i);
  12. }
  13. }
  14. for(new idx = 1; idx < sizeof(HouseInfo); idx++)//Loops through the houses.
  15. {
  16. if(!HouseInfo[idx][hLevel])
  17. {
  18. print("Houses saved successfully.");
  19. break;//Breaks the loop if the price is 0(Meaning it doesn't exist)
  20. }
  21. SaveHouses(idx);
  22. }
  23. for(new idx = 1; idx < sizeof(BizInfo); idx++)//Loops through the businesses.
  24. {
  25. if(!BizInfo[idx][bType])
  26. {
  27. print("Business saved successfully.");
  28. break;//Breaks the loop if the price is 0(Meaning it doesn't exist)
  29. }
  30. SaveBiz(idx);
  31. }
  32. //SaveFamilies();
  33. SavePoints();
  34. SaveDoors();
  35. SaveGates();
  36. SaveFactions();
  37. SaveCams();
  38. SaveGarages();
  39. SaveMapIcons();
  40. SaveArrestPoint();
  41. SaveDoors();
  42. SaveDrugs();
  43. SaveMOTDS();
  44. SaveProducts();
  45. SaveObjects();
  46. SaveObjects22();
  47. SavegObjects();
  48. SaveObjects22g();
  49. new string[128];
  50. format(string, sizeof(string), "AdmWarn: %s has saved all server files.", RPN(playerid));
  51. SendAdminMessage(COLOR_DARKRED, 1, string);
  52. print("** All users files has been saved **");
  53. return 1;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment