registering aint working right [+rep]
#3

thats the onplayerdisconnect
Код:
public OnPlayerDisconnect(playerid, reason)
{
	if(TextdrawActive[playerid] == 1)
	{
		TextDrawHideForPlayer(playerid, TextDraw[playerid]);
		TextDrawDestroy(TextDraw[playerid]);
	}
	TextDrawHideForPlayer(playerid,ShadInfoBox[playerid]);
	TextDrawDestroy(ShadInfoBox[playerid]);
    SavePlayerAchievements(playerid);

    for(new a=1; a<=MAX_ACHIEVEMENTS; a++)
	{
	    ACH_USER[playerid][achprogress][a] = 0;
	    ACH_USER[playerid][achieved][a] = 0; //Fixed.
	}
	
	
    oplayers--;
	SaveAccountStats(playerid);
    new pName[MAX_PLAYER_NAME];
    new string[56];
    GetPlayerName(playerid, pName, sizeof(pName));
    switch(reason)
    {
		case 0: format(string, sizeof(string), "**%s has left the Server.(Timeout/Crash)**", pName);
	    case 1: format(string, sizeof(string), "** %s has left the Server. **", pName);
	    case 2: format(string, sizeof(string), "** %s has left the Server.(Kick/Ban)**", pName);
    }
    SendClientMessage(playerid,COLOR_RED, string);
    return 1;
}
Reply


Messages In This Thread
registering aint working right [+rep] - by WardenCS - 14.03.2012, 15:55
Re: registering aint working right [+rep] - by HuSs3n - 14.03.2012, 17:05
Re: registering aint working right [+rep] - by WardenCS - 14.03.2012, 17:54
Re: registering aint working right [+rep] - by Aprezt - 14.03.2012, 18:00
Re: registering aint working right [+rep] - by WardenCS - 14.03.2012, 18:09

Forum Jump:


Users browsing this thread: 1 Guest(s)