What is wrong with OnPlayerDisconnect?
#1

Heey guys,

I have a little question. Did anyone know what is wrong with this?:

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new pName[90],string[256];
    GetPlayerName(playerid,pName,sizeof(pName));
    switch(reason)
    {
        case 0: format(string, sizeof(string), "%s has left the server. (Crashed)", pName);
        case 1: format(string, sizeof(string), "%s has left the server. (Leaving)", pName);
        case 2: format(string, sizeof(string), "%s has left the server. (Kicked)", pName);
        }
        SendClientMessageToAll(COLOR_GREY,string);
    }
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    INI_WriteInt(File,"AdminLvl",PlayerInfo[playerid][pAdminLvl]);
    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Close(File);
    return 1;
}
When I didnt make the had left the server function. My pawn will it compiled. But when I add it it wont be compiled..

Can anyone help me?
Reply


Messages In This Thread
What is wrong with OnPlayerDisconnect? - by Connection - 26.08.2012, 09:59
Re: What is wrong with OnPlayerDisconnect? - by JaKe Elite - 26.08.2012, 10:03
Re: What is wrong with OnPlayerDisconnect? - by Universal - 26.08.2012, 10:05
Re: What is wrong with OnPlayerDisconnect? - by Connection - 26.08.2012, 10:07
Re: What is wrong with OnPlayerDisconnect? - by [MM]RoXoR[FS] - 26.08.2012, 10:13
Re: What is wrong with OnPlayerDisconnect? - by Connection - 26.08.2012, 10:15
Re: What is wrong with OnPlayerDisconnect? - by cessil - 26.08.2012, 10:16
Re: What is wrong with OnPlayerDisconnect? - by Connection - 26.08.2012, 10:18

Forum Jump:


Users browsing this thread: 2 Guest(s)