23.09.2012, 10:53
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?
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:join( playerid, params[ ] )
{
if(IsPlayerInRangeOfPoint(playerid,15.0,1394.8756,1185.4381,10.8203))//SouthBoys
{
if(GetPlayerTeam(playerid) == 0)
{
if(SouthBoysM == 0 || SouthBoysM == 1 || SouthBoysM == 2 || SouthBoysM == 3 || SouthBoysM == 4)
{
SetPlayerTeam(playerid, 1);
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;
}