30.04.2014, 14:09
OnPlayerDisconnect:
Function:
At first I saw 0. Then I use /joinmessage only show () not (Test)
pawn Код:
if(fexist(UserPath(playerid)))
{
if(PlayerLogged[playerid] == 1)
{
new INI:file = INI_Open(UserPath(playerid));
INI_SetTag(file,"data");
INI_WriteInt(file,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(file,"WantedLevel",GetPlayerWantedLevel(playerid));
INI_WriteInt(file,"Score",GetPlayerScore(playerid));
INI_WriteInt(file,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(file,"TruckerJob",PlayerInfo[playerid][TruckerJob]);
INI_WriteString(file,"JoinMessage", PlayerInfo[playerid][JoinMessage]);
PlayerInfo[playerid][Score] = GetPlayerScore(playerid);
INI_Close(file);
}
return 1;
}
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo[playerid][pPass]);
INI_Int("Score",PlayerInfo[playerid][Score]);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
INI_Int("WantedLevel",PlayerInfo[playerid][Wanted]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("Vip",PlayerInfo[playerid][pVip]);
INI_Int("TruckerJob",PlayerInfo[playerid][TruckerJob]);
INI_String("JoinMessage",PlayerInfo[playerid][JoinMessage], 28);
INI_Int("Banned", PlayerInfo[playerid][pBanned]);
return 1;
}