SA-MP Forums Archive
How do i get a players reason for leaving? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How do i get a players reason for leaving? (/showthread.php?tid=370941)



How do i get a players reason for leaving? - [p3]pr0t0typ3 - 21.08.2012

I made a leave message but it always just says they left,even if they just timeout.I was wondering if someone could help me get different message for if they timeout.


Re: How do i get a players reason for leaving? - Roko_foko - 21.08.2012

OnPlayerDisconnect


Re: How do i get a players reason for leaving? - AliveBG - 21.08.2012

hmm,
PHP код:
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playeridpNameMAX_PLAYER_NAME);
switch(
reason)
{
    case 
0format(stringsizeof string"%s has left the server. (Crash)"pName);
    case 
1format(stringsizeof string"%s has left the server. (Exit the game)"pName);
    case 
2format(stringsizeof string"%s has left the server. (Kicked/Banned)"pName);
}
SendClientMessageToAll(whitestring);