OnPlayerPart, it doesn't work, what's up????

Started by KingDark, Dec 29, 2019, 12:04 AM

Previous topic - Next topic

KingDark


recently, I put in my Main.nut, OnPalyerPart, to be able to deduce why they disconnect, but recently, I got an error, about "echomessage".
I don't understand what's wrong with that, I took it out of the wiki https://web.archive.org/web/20180930091308/http://wiki.vc-mp.org

Here I pass the code in case you are interested

function onPlayerPart (player, reason)
{
    switch (reason)
    {
        case 0:
        {
            Message ("[# FF77AF] [PART] [# ac8000]" + player.Name + "[#ffffff] quit.");
            EchoMessage (ICOL_GREEN + "[PART]" + player.Name + "Qito el juego.");
            break;
        }
        case 1:
        {
            Message ("[# FF77AF] [PART] [# ac8000]" + player.Name + "[#ffffff] Disconnected");
            EchoMessage (ICOL_GREEN + "[PART]" + player.Name + "Desconecto el juego");
            break;
        }
        case 2:
        {
            Message ("[# FF77AF] [PART] [# ac8000]" + player.Name + "[#ffffff] timeout.");
            EchoMessage (ICOL_GREEN + "[PART]" + player.Name + "Internet fuera.");
            break;
        }
        case 3:
        {
            Message ("[# FF77AF] [PART] [# ac8000]" + player.Name + "[#ffffff] Kicked for banned.");
            EchoMessage (ICOL_GREEN + "[PART]" + player.Name + "Kickeado Por ProhibiciĆ³n.");
            break;
        }
        case 4:
        {
            Message ("[# FF77AF] [PART] [# ac8000]" + player.Name + "[#FFFFFF] Kicked.");
            EchoMessage (ICOL_GREEN + "[PART]" + player.Name + "Kickeado.");
            break;
        }
        case 5:
        {
            Message ("[# FF77AF] [PART] [# ac8000]" + player.Name + "[#FFFFFF] banned.");
            EchoMessage (ICOL_GREEN + "[PART]" + player.Name + "Prohibido.");
            break;
        }
        case 6:
        {
            Message ("[# FF77AF] [PART] [# ac8000]" + player.Name + "[#FFFFFF] Error Crash.");
            EchoMessage (ICOL_GREEN + "[PART]" + player.Name + "VC error.");
            break;
        }
    }
}

#NULL

D4rkR420R


NicusorN5

It propably dosen't exist. Write an empty EchoMessage like this
function EchoMessage(text) { }