29.12.2010, 04:20
if you arent saving stuff
else
that's basic (quote if any error)
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new string[64], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
switch(reason)
{
case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);
case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);
case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);
}
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new
string[64],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
switch(reason)
{
case 0: // crashed
}
// save stuff here and etc.
{
case 1: // disconnected
}
// stuff here
{
case 2: // kicked or banned
}
// stuff
{
SendClientMessageToAll(0xFFFFFFAA,string);
}
}
return 1;
}