OnPlayerDisconnect
#1

pawn Код:
if(WantedLevel[playerid] >= 1)
    {
        new string[128];
        new wanted = WantedLevel[playerid];
        new sendername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(wanted > 0)
        {
            switch(reason)
            {
                case 0:
                {
                    format(string,128, "%s has exit the game and he had %d wanted points. ( Quit )",sendername,wanted);
                }
                case 1:
                {
                    format(string,128, "%s has exit the game and he had %d wanted points. ( Crash )",sendername,wanted);
                }
            }
            SendTeamMessage(2, 0x00ACB2AA, string);
        }
    }
If I leave the game it sends random message, or crash or quit, what's wrong in that code?
Reply
#2

Case 0 is supposed to be 'crashed', and Case 1 is supposed to be 'quit'.
Reply
#3

Quote:
Originally Posted by Carlton
Case 0 is supposed to be 'crashed', and Case 1 is supposed to be 'quit'.
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)