Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerDisconnect(playerid, reason)
- {
- new string[128];
- if(GetPVarInt(playerid, "Logged") == 1)
- {
- switch(reason)
- {
- case 0:
- {
- format(string,sizeof string,"[Join/Quit] %s left the server. (Timed out)",GetPlayerNameEx(playerid));
- SendClientMessageToAll(color_grey, string);
- }
- case 1:
- {
- format(string,sizeof string,"[Join/Quit] %s left the server. (Leaving)",GetPlayerNameEx(playerid));
- SendClientMessageToAll(color_grey, string);
- }
- case 2:
- {
- format(string,sizeof string,"[Join/Quit] %s left the server. (Kicked/Banned)",GetPlayerNameEx(playerid));
- SendClientMessageToAll(color_grey, string);
- }
- }
- printf("[Join/Quit] %s has left the server.", GetPlayerNameEx(playerid));
- SetPVarInt(playerid, "Player:Logged", 0);
- KillTimer(Level[playerid]);
- KillTimer(JailTime);
- SetPVarInt(playerid, "AdminLevel", 0);
- SetPVarInt(playerid, "pMinutes", 0);
- KillTimer(InjuriedTime);
- KillTimer(DeadTime);
- DeletePVar(playerid, "Injuried");
- DeletePVar(playerid, "Dead");
- Delete3DTextLabel(label[playerid]);
- KillTimer(Level[playerid]);
- KillTimer(AJailTimer[playerid]);
- KillTimer(OnlineTimer[playerid]);
- SetPVarInt(playerid, "Online15Minutes", 0);
- SaveStats(playerid);
- SetPVarInt(playerid, "user_id", 0);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement