17.05.2012, 08:35
i mean like this
PHP 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); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect1); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect2); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect3); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect4); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect5); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect6); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect7); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect8); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect9); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect10); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect11); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect12); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect13); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect14); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect15); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect16); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect17); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect18); // Connect Textdraw
TextDrawHideForPlayer(playerid, TextdrawConnect19); // Connect Textdraw
TextDrawHideForPlayer(playerid, Time1), TextDrawHideForPlayer(playerid, Date); // DATE AND TIME
TextDrawHideForPlayer(playerid, Credit); // Credits
StopAudioStreamForPlayer(playerid);
Radio[playerid] = false;
return 1;
}
return 0;
}