26.08.2012, 09:59
Heey guys,
I have a little question. Did anyone know what is wrong with this?:
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?
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;
}
Can anyone help me?