[Ajuda] Conectar e disconectar
#2

pawn Код:
public OnPlayerConnect(playerid)
{
    new sStr[128];
    format(sStr, sizeof(sStr), "%s acabou de se conectar ao servidor.", nome(playerid));
    SendClientMessageToAll(0xFFFFFFAA, sStr);
}
public OnPlayerDisconnect(playerid, reason)
{
    new sStr[128];
   
    switch(reason)
    {
        case 0: format(sStr,sizeof(sStr),"%s saiu do servidor. (Problemas de conexгo)",nome(playerid));
        case 1: format(sStr,sizeof(sStr),"%s saiu do servidor. (Vontade prуpria)",nome(playerid));
        case 2: format(sStr,sizeof(sStr),"%s saiu do servidor. (Kikado/banido)",nome(playerid));
    }
    SendClientMessageToAll(0xFFFFFFAA, sStr);
    return 1;
}

stock nome(playerid)
{
    new sNome [ MAX_PLAYER_NAME ] ;
    GetPlayerName(playerid, sNome, MAX_PLAYER_NAME);
}
Reply


Messages In This Thread
Conectar e disconectar - by minimessi10 - 12.07.2013, 18:03
Re: Conectar e disconectar - by WLSF - 12.07.2013, 18:13
Re: Conectar e disconectar - by Miqueias Barros - 12.07.2013, 18:17

Forum Jump:


Users browsing this thread: 1 Guest(s)