Save Variables and load them.
#1

Hello!
I made some kind of a Team Ballance system,based on variables.When a player uses /join command to join a team,the variable increases.Max team members is 5.But I have a question.How can I save the variables and load them after server restarts / closes - reopens?

PHP код:
new SouthBoysM 0;
CMD:joinplayeridparams[ ] )
{
    if(
IsPlayerInRangeOfPoint(playerid,15.0,1394.8756,1185.4381,10.8203))//SouthBoys
    
{
        if(
GetPlayerTeam(playerid) == 0)
        {
            if(
SouthBoysM == || SouthBoysM == || SouthBoysM == || SouthBoysM == || SouthBoysM == 4)
            {
                
SetPlayerTeam(playerid1);
                
SCM(playerid,COLOR_SOUTHBOYS,"You are now a SouthBoy.");
                
SetPlayerSkin(playerid,SouthBoysSkins[random(6)]);
                
SetPVarInt(playerid,"Skin",SouthBoysSkins[random(6)]);
                
SpawnPlayer(playerid);
                
SouthBoysM++;
            }
            else
            {
                
SCM(playerid,COLOR_DGREY,"This Team has already 5 members.");
            }
        }
        else
        {
            
SCM(playerid,COLOR_DGREY,"You must be a Civillian if you want to join this Team.");
        }
    }
        return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)