27.02.2017, 01:49
https://sampforum.blast.hk/showthread.php?tid=256961
Copy and paste that if you want to be lazy, if you want to learn, read the link I posted.
Quick highlighting:
Код:
public SaveGeneralData() { for(new i = 0; i < MAX_PLAYERS; i++) { TogglePlayerControllable(i, false); ClearAnimations(i); QuickSave(i); } SendClientMessageToAll(LIGHTRED, "[Server] Server is now saving your data, please wait for it to complete."); SaveGroups(); UpdateAnalysis(); SaveJobs(); SaveHouses(); SaveBusinesses(); if(CurGMX == 1) { SendClientMessageToAll(WHITE, "Any changes made now will not be saved until the server has fully rebooted."); for(new i = 0; i < MAX_PLAYERS; i++) { TogglePlayerControllable(i, false); ClearAnimations(i); QuickSave(i); } CurGMX = 2; } else { for(new i = 0; i < MAX_PLAYERS; i++) { SavePlayerData(i); } } return 1; }
Quick highlighting:
PHP код:
public SaveGeneralData()
{
{ // what is this doing?
for(new i = 0; i < MAX_PLAYERS; i++)
{
TogglePlayerControllable(i, false);
ClearAnimations(i);
QuickSave(i);
}
{ // what is this doing?
SendClientMessageToAll(LIGHTRED, "[Server] Server is now saving your data, please wait for it to complete.");
SaveGroups();
UpdateAnalysis();
SaveJobs();
SaveHouses();
SaveBusinesses();
} // what is this doing?
} // what is this doing?