When player leave your server.
#1

When a player leaves to my server. and im on admin duty. i can see if they are (Leave/Timeout/Kick/Banned)

I have this but i dont know how to script.. if you are on admin duty you will see this message:
Код:
	new string[128];
	switch (reason)
	{
		case 0:
		{
			format(string, sizeof(string), "%s has left the server (timeout).", GetPlayerNameEx(playerid));
			ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
			if(PlayerCuffed[playerid] != 0)
			{
				strcpy(PlayerInfo[playerid][pPrisonedBy], "Server", 64);
				strcpy(PlayerInfo[playerid][pPrisonReason], "Logging while cuffed (timeout)", 64);
				
				PlayerInfo[playerid][pJailed] = 3;
				PlayerInfo[playerid][pJailTime] += 30*60;
			}
		}
		case 1:
		{
			format(string, sizeof(string), "%s has left the server (leaving).", GetPlayerNameEx(playerid));
			ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
			if(PlayerCuffed[playerid] != 0)
			{
				strcpy(PlayerInfo[playerid][pPrisonedBy], "Server", 64);
				strcpy(PlayerInfo[playerid][pPrisonReason], "Logging while cuffed (leaving)", 64);
				
				PlayerInfo[playerid][pJailed] = 3;
				PlayerInfo[playerid][pJailTime] += 20*60;
			}
		}
		case 2:
		{
			format(string, sizeof(string), "%s has left the server (kicked/banned).", GetPlayerNameEx(playerid));
			ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
		}
		
	}
admin duty variable
Код:
AdminDuty
Reply
#2

Bump
Reply
#3

Remove the ProxDetector from the code..
Reply
#4

Quote:
Originally Posted by UnknownOwner
Посмотреть сообщение
Remove the ProxDetector from the code..
o_O??
Reply
#5

pawn Код:
new string[128];
    switch (reason)
    {
        case 0:
        {
            format(string, sizeof(string), "%s has left the server (timeout).", GetPlayerNameEx(playerid));
            if(PlayerCuffed[playerid] != 0)
            {
                strcpy(PlayerInfo[playerid][pPrisonedBy], "Server", 64);
                strcpy(PlayerInfo[playerid][pPrisonReason], "Logging while cuffed (timeout)", 64);
               
                PlayerInfo[playerid][pJailed] = 3;
                PlayerInfo[playerid][pJailTime] += 30*60;
            }
        }
        case 1:
        {
            format(string, sizeof(string), "%s has left the server (leaving).", GetPlayerNameEx(playerid));
            if(PlayerCuffed[playerid] != 0)
            {
                strcpy(PlayerInfo[playerid][pPrisonedBy], "Server", 64);
                strcpy(PlayerInfo[playerid][pPrisonReason], "Logging while cuffed (leaving)", 64);
               
                PlayerInfo[playerid][pJailed] = 3;
                PlayerInfo[playerid][pJailTime] += 20*60;
            }
        }
        case 2:
        {
            format(string, sizeof(string), "%s has left the server (kicked/banned).", GetPlayerNameEx(playerid));
        }
       
    }
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(AdminDuty[i] == 1) SendClientMessage(i, -1, string);
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)