dini_IntSet(file, "Team", gTeam[playerid]);
dini_IntSet(file, "Team", gTeam[playerid] = 5);
gTeam[playerid] = dini_Int(file, "Team");
dini_IntSet(file, "Team", SetPlayerTeam(playerid, 5));
replace it with
dini_IntSet(file, "Team", 5);
SetPlayerTeam(playerid, 5);
This one
pawn Код:
|
Sorry, misread
EDIT:This one pawn Код:
|
The Team number is not saving in the user file?
btw enum pInfo { pTeam, <-- this one is not needed, since you can use SetPlayerTeam and GetPlayerTeam natives, so remove } |
public OnPlayerDisconnect
You did copy all your code here but didn't put the most important part, Can I see your
pawn Код:
|
public OnPlayerDisconnect(playerid, reason)
{
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), scriptfiles, name);
if(gPlayerLogged[playerid] == 1)
{
dini_IntSet(file, "HasCondom", AccountInfo[playerid][pPackCondom]);
dini_IntSet(file, "PackCondom",AccountInfo[playerid][pPackCondom]);
dini_IntSet(file, "HasPack",AccountInfo[playerid][pHasPack]);
dini_IntSet(file, "HasCigar",AccountInfo[playerid][pHasCigar]); // pHasCigar
dini_IntSet(file, "PackCigars",AccountInfo[playerid][pPackCigars]);
dini_IntSet(file, "PackSnack",AccountInfo[playerid][pPackSnack]);
dini_IntSet(file, "HasSnack",AccountInfo[playerid][pHasSnack]);
dini_IntSet(file, "AdminLevel",AccountInfo[playerid][pAdminLevel]);
dini_IntSet(file, "Money", GetPlayerMoney(playerid));
dini_IntSet(file, "Score", GetPlayerScore(playerid));
dini_IntSet(file, "Team", GetPlayerTeam(playerid));
}
for(new i = 0; i < sizeof(Objects); i++) ////Xobj
{
if(Player[playerid][view][i])
{
Player[playerid][view][i] = false;
DestroyPlayerObject(playerid,Player[playerid][objid][i]);
}
}
new string[200];
PLAYERLIST_authed[playerid]=false;
switch(reason)
{
case 0: format(string, 200, "%s has left the server. (Timeout)", PlayerInfo(playerid));
case 1: format(string, 200, "%s has left the server. (Left)", PlayerInfo(playerid));
case 2: format(string, 200, "%s has left the server. (Kicked)", PlayerInfo(playerid));
}
SendClientMessageToAll(COLOR_DEADCONNECT, string);
playerCheckpoint[playerid] =0;
gPlayerLogged[playerid] = 0;
RemoveVariables(playerid);
return 1;
}
#define scriptfiles "/ILSRP/%s.ini"
format(file, sizeof(file), scriptfiles, name);
format(file, sizeof(file), scriptfiles, name);
Password=232129203
HasCondom=0
PackCondom=0
HasCigar=0
HasPack=0
PackSnack=0
AdminLevel=0
PackCigars=0
HasSnack=0
Money=1500
Score=1
Team=0