Indentation
#3

https://sampforum.blast.hk/showthread.php?tid=256961

Код:
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; 
}
Copy and paste that if you want to be lazy, if you want to learn, read the link I posted.

Quick highlighting:

PHP код:
public SaveGeneralData() 

    {  
// what is this doing?
        
for(new 0MAX_PLAYERSi++) 
        { 
            
TogglePlayerControllable(ifalse); 
            
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? 
Reply


Messages In This Thread
Indentation - by ChromeMenu - 27.02.2017, 00:23
Re: Indentation - by Unte99 - 27.02.2017, 00:41
Re: Indentation - by Toroi - 27.02.2017, 01:49

Forum Jump:


Users browsing this thread: 1 Guest(s)