17.05.2012, 08:46
pawn Code:
public OnPlayerDisconnect(playerid, reason)
{
if(pLogged[playerid] == 1)
{
new INI:iFile = INI_Open(PlayerPath(playerid));
INI_SetTag(iFile,"data");
INI_WriteInt(iFile,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(iFile,"Score",GetPlayerScore(playerid));
INI_Close(iFile);
}
pLogged[playerid] = 0;
TextDrawHideForPlayer(playerid, TextdrawConnect0);
TextDrawHideForPlayer(playerid, TextdrawConnect1);
TextDrawHideForPlayer(playerid, TextdrawConnect2);
TextDrawHideForPlayer(playerid, TextdrawConnect3);
TextDrawHideForPlayer(playerid, TextdrawConnect4);
TextDrawHideForPlayer(playerid, TextdrawConnect5);
TextDrawHideForPlayer(playerid, TextdrawConnect6);
TextDrawHideForPlayer(playerid, TextdrawConnect7);
TextDrawHideForPlayer(playerid, TextdrawConnect8);
TextDrawHideForPlayer(playerid, TextdrawConnect9);
TextDrawHideForPlayer(playerid, TextdrawConnect10);
TextDrawHideForPlayer(playerid, TextdrawConnect11);
TextDrawHideForPlayer(playerid, TextdrawConnect12);
TextDrawHideForPlayer(playerid, TextdrawConnect13);
TextDrawHideForPlayer(playerid, TextdrawConnect14);
TextDrawHideForPlayer(playerid, TextdrawConnect15);
TextDrawHideForPlayer(playerid, TextdrawConnect16);
TextDrawHideForPlayer(playerid, TextdrawConnect17);
TextDrawHideForPlayer(playerid, TextdrawConnect18);
TextDrawHideForPlayer(playerid, TextdrawConnect19);
TextDrawHideForPlayer(playerid, Time1);
TextDrawHideForPlayer(playerid, Date); // DATE AND TIME
TextDrawHideForPlayer(playerid, Credit); // Credits
StopAudioStreamForPlayer(playerid); // I find this pointless
Radio[playerid] = false;
return 1;
}