[Ajuda] OnPlayerConnect
#1

Galera queria exibir algumas mensagens quando o VIP conectar no servidor. Entгo fiz esse codigo

pawn Код:
if ( !IsPlayerVIP(playerid))
    {
        format(string, sizeof(string), "{D7D7D7}O Jogador Vip {00FFFF}%s{D7D7D7} (ID: {00FFFF}%i{D7D7D7}){00FF00} Entrou{D7D7D7} no Servidor. Estado: %s.", Nome_Player, playerid, estado);
        SendClientMessageToAll(0xFF0000FF, string);
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "                  Seja Bem Vindo             ");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Administrador: {FF0000}Nгo");
        new DName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,DName,sizeof(DName));
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Player VIP: {FF0000}Sim");
        return 0;
    }
No meu sistema de Vip a variavel й essa
pawn Код:
if ( !IsPlayerVIP(playerid))
Porйm quando um player normal entra aparece que ele й vip, e se entra um vip aparece que nгo.

O Mesmo acontece com a TAG Vip no Chat.
pawn Код:
if ( !IsPlayerVIP(playerid))
    {
        SetPlayerChatBubble(playerid, text, 0xFFFDE8AA, 100.0, 10000);
        format(MessageText, sizeof(MessageText), "(ID:%d){40FF00}[VIP]: {FFFFFF}%s", playerid, text);
        SendPlayerMessageToAll(playerid, MessageText);
        new u[26];
        GetPlayerName(playerid, u, 24);
        format(MsgText, sizeof(MsgText), "(ID:%d) %s : %s", u, playerid, text);
        EscreverLog("ChatGlobal", MsgText);
    }
Alguem me ajuda?
Reply
#2

Vocк utilizou o operador lуgico NOT(!), que representa a negaзгo da condiзгo.

pawn Код:
if ( !IsPlayerVIP(playerid))
Em pseudo-cуdigo, isto ficaria:
Quote:
SE o PLAYERID NГO for vip

Veja mais a respeito dos operadores no link abaixo.
Abraзos.
Reply
#3

pawn Код:
if ( !IsPlayerVIP(playerid))
O operador "!" faz com que, a condiзгo, sу serб executada se o player nгo for vip.
pawn Код:
if(IsPlayerVIP(playerid))
    {
        SetPlayerChatBubble(playerid, text, 0xFFFDE8AA, 100.0, 10000);
        format(MessageText, sizeof(MessageText), "(ID:%d){40FF00}[VIP]: {FFFFFF}%s", playerid, text);
        SendPlayerMessageToAll(playerid, MessageText);
        new u[26];
        GetPlayerName(playerid, u, 24);
        format(MsgText, sizeof(MsgText), "(ID:%d) %s : %s", u, playerid, text);
        EscreverLog("ChatGlobal", MsgText);
    }
Й sу isso, abraзos.
Reply
#4

Quote:
Originally Posted by Dolby
Посмотреть сообщение
Vocк utilizou o operador lуgico NOT(!), que representa a negaзгo da condiзгo.

pawn Код:
if ( !IsPlayerVIP(playerid))
Em pseudo-cуdigo, isto ficaria:


Veja mais a respeito dos operadores no link abaixo.
Abraзos.
O Chat foi corrigido, porйm a mensagem ao conectar ainda continua, Obrigado.

Quote:
Originally Posted by Cor3y
Посмотреть сообщение
pawn Код:
if ( !IsPlayerVIP(playerid))
O operador "!" faz com que, a condiзгo, sу serб executada se o player nгo for vip.
pawn Код:
if(IsPlayerVIP(playerid))
    {
        SetPlayerChatBubble(playerid, text, 0xFFFDE8AA, 100.0, 10000);
        format(MessageText, sizeof(MessageText), "(ID:%d){40FF00}[VIP]: {FFFFFF}%s", playerid, text);
        SendPlayerMessageToAll(playerid, MessageText);
        new u[26];
        GetPlayerName(playerid, u, 24);
        format(MsgText, sizeof(MsgText), "(ID:%d) %s : %s", u, playerid, text);
        EscreverLog("ChatGlobal", MsgText);
    }
Й sу isso, abraзos.
Obrigado consegui corrigir o Chat, porem a msg ao conectar nгo da certo, ja alterei e msm assim nгo vai

@Topic

Alguem?
Reply
#5

Quote:
Originally Posted by GHLEMES
Посмотреть сообщение
Obrigado consegui corrigir o Chat, porem a msg ao conectar nгo da certo, ja alterei e msm assim nгo vai
Poste todo o cуdigo da Callback OnPlayerConnect.
Reply
#6

pawn Код:
public OnPlayerConnect(playerid)
{
//VIP
    LoadPlayerVIP(playerid);
//________
    new samp[128];
    GetPlayerVersion(playerid, samp, 128);
    if(strcmp(samp, "unknown", false) == 0)
    {
        BanEx(playerid, "BOT"); //Proteзгo by NicK
        return 1;
    }

    //Mudarnick
    MudarNick[playerid] = false;
    //Musica
    PlayerPlaySound(playerid, 1185, 0, 0, 0);
    //Escudo
    Equipamentos[playerid] = 0;
    //afk
    g_AFK[playerid] = false; // Definir g_AFK para false.
    //chat kill
    SendDeathMessage(INVALID_PLAYER_ID, playerid, 200);
    //loteria
    _BilheteComprado[playerid] = 0;
    /*ClassRank[playerid] = Create3DTextLabel(RankPlayer, 0x067D00FF, 0.0, 0.0, 0.0, 30.0, 0,1);*/
    /* -----------------------------------------------------------------------------------------------------*/
    // Tempo conectado /admins
    /* -----------------------------------------------------------------------------------------------------*/
    APlayerData[playerid][TempoConectado] = 0;
    GPSCasa[playerid] = false;
    /* -----------------------------------------------------------------------------------------------------*/
    // Get info da INC geoip
    /* -----------------------------------------------------------------------------------------------------
    GetPlayerGeoIP(playerid);*/

    /* -----------------------------------------------------------------------------------------------------*/
    // Speedometer setup
    /* -----------------------------------------------------------------------------------------------------*/
    Speedometer_Setup(playerid);

    /* -----------------------------------------------------------------------------------------------------*/
    // Remove objetos do desvio do tunel de SANTA MARIA LS
    /* -----------------------------------------------------------------------------------------------------*/
    RemoveBuildingForPlayer(playerid, 762, 1023.5938, -2050.6875, 16.0859, 0.25);
    RemoveBuildingForPlayer(playerid, 762, 1011.8594, -2043.5000, 16.0859, 0.25);
    /* -----------------------------------------------------------------------------------------------------*/
    // Textdraw /skin 0.3x
    /* -----------------------------------------------------------------------------------------------------*/
    gHeaderTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gBackgroundTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gCurrentPageTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gNextButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gPrevButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    for(new x=0; x < SELECTION_ITEMS; x++)
    {
        gSelectionItems[playerid][x] = PlayerText:INVALID_TEXT_DRAW;
    }
 /* --------------------------------------------------------*/
    // Text Draw reloginho
    /* --------------------------------------------------------*/

    gItemAt[playerid] = 0;
 /* --------------------------------------------------------*/
    // Cabelo
    /* --------------------------------------------------------*/
    pHairSlot[playerid] = -1;
    /* --------------------------------------------------------*/
    // A
    /* --------------------------------------------------------*/
    if(!IsPlayerNPC(playerid)) pObject[playerid][slotreserved] = false;
    /* --------------------------------------------------------*/
    // Le o PM
    /* --------------------------------------------------------*/
    LerPms[playerid] = false;
    /* --------------------------------------------------------*/
    // Bloqueia pm
    /* --------------------------------------------------------*/
    PmBlock[playerid] = false;
    /* --------------------------------------------------------*/
    // Verifica se esta no evento
    /* --------------------------------------------------------*/
    PlayerInfo[playerid][NoEvento] = 0;
    /* --------------------------------------------------------*/
    // Verifica se estб no carro
    /* --------------------------------------------------------*/
    PlayerInfo[playerid][Carro] = 0;
    /* --------------------------------------------------------*/
    // CHECA SE O PLAYER ESTБ BANIDO
    /* --------------------------------------------------------*/
    ChecarBan(playerid);
    /* --------------------------------------------------------*/
    // Ultimo Login
    /* --------------------------------------------------------*/
    APlayerData[playerid][UltimoLogin] = 0;
    /* --------------------------------------------------------*/
    // Objetos removidos ''Doherty''
    /* --------------------------------------------------------*/
    RemoveBuildingForPlayer(playerid, 11091, -2133.5547, -132.7031, 36.1328, 0.25);
    RemoveBuildingForPlayer(playerid, 11376, -2144.3516, -132.9609, 38.3359, 0.25);
    RemoveBuildingForPlayer(playerid, 11011, -2144.3516, -132.9609, 38.3359, 0.25);
    RemoveBuildingForPlayer(playerid, 11009, -2128.5391, -142.8438, 39.1406, 0.25);
    RemoveBuildingForPlayer(playerid, 1278, -2137.6172, -110.9375, 48.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 16615, -389.7656, 1515.1641, 74.5547, 0.25);
    RemoveBuildingForPlayer(playerid, 16616, -326.6953, 1541.3906, 74.5547, 0.25);
    RemoveBuildingForPlayer(playerid, 16751, -324.1484, 1302.2266, 52.6641, 0.25);
    RemoveBuildingForPlayer(playerid, 16143, -324.1484, 1302.2266, 52.6641, 0.25);
    RemoveBuildingForPlayer(playerid, 16144, -324.1484, 1302.2266, 52.6641, 0.25);
    RemoveBuildingForPlayer(playerid, 16137, -389.7656, 1515.1641, 74.5547, 0.25);
    RemoveBuildingForPlayer(playerid, 16138, -326.6953, 1541.3906, 74.5547, 0.25);
    //Avenida Lv e Obejtos dO Resgate Chegando Em Ls
    RemoveBuildingForPlayer(playerid, 11372, -2076.4375, -107.9297, 36.9688, 0.25);
    RemoveBuildingForPlayer(playerid, 11014, -2076.4375, -107.9297, 36.9688, 0.25);
    RemoveBuildingForPlayer(playerid, 9120, 2027.3906, 833.1172, 5.8750, 0.25);
    RemoveBuildingForPlayer(playerid, 9160, 2027.3906, 833.1172, 5.8750, 0.25);
    RemoveBuildingForPlayer(playerid, 1438, -109.1641, -1181.3438, 1.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1438, -84.2422, -1180.2656, 0.8516, 0.25);
    RemoveBuildingForPlayer(playerid, 1415, -77.2188, -1188.3672, 0.8359, 0.25);
    RemoveBuildingForPlayer(playerid, 1676, -92.1016, -1161.7891, 2.9609, 0.25);
    RemoveBuildingForPlayer(playerid, 1676, -97.0703, -1173.7500, 3.0313, 0.25);
    RemoveBuildingForPlayer(playerid, 1440, -103.6875, -1172.5781, 2.2656, 0.25);
    RemoveBuildingForPlayer(playerid, 17065, -90.1953, -1169.6719, 5.3125, 0.25);
    RemoveBuildingForPlayer(playerid, 1676, -85.2422, -1165.0313, 2.6328, 0.25);
    RemoveBuildingForPlayer(playerid, 1676, -90.1406, -1176.6250, 2.6328, 0.25);
    RemoveBuildingForPlayer(playerid, 17064, -75.4688, -1174.5469, 0.8750, 0.25);
    RemoveBuildingForPlayer(playerid, 1438, -77.4219, -1165.5547, 1.0234, 0.25);
    RemoveBuildingForPlayer(playerid, 1447, -89.9297, -1133.7500, 1.3906, 0.25);
    RemoveBuildingForPlayer(playerid, 1438, -87.0547, -1132.6797, 0.0469, 0.25);
    RemoveBuildingForPlayer(playerid, 1462, -79.2500, -1137.7188, 0.0547, 0.25);
    RemoveBuildingForPlayer(playerid, 3285, -73.8047, -1141.4219, 1.9844, 0.25);
    RemoveBuildingForPlayer(playerid, 1462, -84.3750, -1116.0938, 0.2578, 0.25);
    RemoveBuildingForPlayer(playerid, 1447, -84.0547, -1117.2188, 1.3906, 0.25);
    RemoveBuildingForPlayer(playerid, 1462, -60.3594, -1116.9375, 0.2578, 0.25);
    RemoveBuildingForPlayer(playerid, 1438, -63.6719, -1125.6953, 0.0469, 0.25);
    RemoveBuildingForPlayer(playerid, 1438, -63.4141, -1115.4141, 0.0469, 0.25);
/*  //Agencia Bancбria SF
    RemoveBuildingForPlayer(playerid, 10317, -2655.1250, -15.4219, 23.8125, 0.25);
    RemoveBuildingForPlayer(playerid, 10368, -2655.1250, -15.4219, 23.8125, 0.25);
    RemoveBuildingForPlayer(playerid, 10716, -2655.1250, -15.4219, 23.8125, 0.25);
    */

    GetPlayerGeoIP(playerid);
    /* --------------------------------------------------------*/
    // Sempre permitir NPCs fazer o login sem senha ou conta
    /* --------------------------------------------------------*/
    if (IsPlayerNPC(playerid))
  return 1;
    /* --------------------------------------------------------*/
    // Configurar as variбveis ??locais
    /* --------------------------------------------------------*/
    new Name[MAX_PLAYER_NAME], HouseID;
    /* -----------------------------------------------------------------------------------------------------------------------*/
    // // Configurar um PVR para permitir cross-script de dinheiro-transferкncias (somente a partir filterscript para este script principal) e marcar pontos
    /* -----------------------------------------------------------------------------------------------------------------------*/
    SetPVarInt(playerid, "PVarMoney", 0);
    SetPVarInt(playerid, "PVarScore", 0);
    GetPlayerName(playerid, Name, sizeof(Name));
    GetPlayerName(playerid, APlayerData[playerid][PlayerName], 24);
    new serial[128], Ip[25];
    GetPlayerIp(playerid, Ip, sizeof(Ip));
    /* --------------------------------------------------------*/
    // Serial BAN
    /* --------------------------------------------------------*/
    gpci(playerid, serial, sizeof(serial));
    new Stringw[800], NomeR[34], IP[30], Strna[800], IPa[30], NomeaR[34];
    if(DOF2_IsSet("ServerData/BanSerial.txt", serial))
    {
        new JogadorNome[24], String[512];
        GetPlayerIp(playerid, Ip, sizeof(Ip));
        GetPlayerName(playerid, JogadorNome, sizeof(JogadorNome));
        format(String, sizeof(String), "\n                {FFFFFF}*~*Informaзхes Sobre o Banimento *~*\n\nVocк estб Banido Permanentemente do Servidor (AMC)\nCaso Ache isso um BUG Faзa Revisгo em Nosso Forum!!\n\n\n{FF0000}Seus Dados:\n\n{CCCCCC}Seu Nome: {FFFFFF}%s\n{CCCCCC}Seu IP: {FFFFFF}%s\n{CCCCCC}Seu Serial: {FFFFFF}%s\n\n\n\n{CCCCCC}Forum: {FFFF00}automais.sampforum.net", JogadorNome, Ip, serial, DOF2_GetString("ServerData/BanSerial.txt", serial));
        ShowPlayerDialog(playerid, DIALOG_BANIDO, DIALOG_STYLE_MSGBOX, "{00FF00}ж {FFFFFF}Banido permanentemente!", String, "Fechar", "");
        return 1;
  }
 else
 if (PlayerFile_Load(playerid) == 1)
    {
     GetPlayerName(playerid, NomeR, sizeof(NomeR));
     GetPlayerIp(playerid, IP, 30);
     new dia, mes, hora, minuto;
     dia = DOF2_GetInt(ObterConta(playerid), "Dia");
     mes = DOF2_GetInt(ObterConta(playerid), "Mes");
     hora = DOF2_GetInt(ObterConta(playerid), "Hora");
     minuto = DOF2_GetInt(ObterConta(playerid), "Minuto");
     format(Stringw, sizeof(Stringw), "%s{FF8000}» Auto Mais Caminhoneiro «\n\n{999999}Sua Conta: {FFFFFF}%s\n{999999}Seu IP: {FFFFFF}%s\n{999999}Status: {00FF00}Registrada\n{999999}Ultimo Login:{FFFFFF}%s~%s~%s>%s %d:%d:%d:%d:%d:%d: %s<%s~%s~%s \n\n{838B8B}\n\n{FF8000}Digite sua senha para logar!", Stringw, NomeR, IP, dia, mes, hora, minuto, Hora, Minuto, Segundo, Dia, Mes, Ano);
  // Verifique se o jogador ainda й proibido
        if (APlayerData[playerid][BanTime] < gettime()) // Jogador ban-tempo й passado
            ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_PASSWORD, "{00FF00}ж {FFFFFF}Insira sua senha para logar:", Stringw, TXT_DialogLoginButton1, TXT_DialogButtonCancel);
        else // Jogador ainda й proibido
        {
            ShowRemainingBanTime(playerid); // Mostrar o restante tempo proibiзгo para o jogador й dias, horas, minutos, segundos
            Kick(playerid); // Chute o jogador
        }
    }
    else
    if (PlayerFile_Load(playerid) == 0)
    {
        GetPlayerName(playerid, NomeaR, sizeof(NomeaR));
        GetPlayerIp(playerid, IPa, 30);
        format(Strna, sizeof(Strna), "%s{FF8000}» Auto Mais Caminhoneiro «\n\n{999999}Sua Conta: {FFFFFF}%s\n{999999}Seu IP: {FFFFFF}%s\n{999999}Status: {FF0000}Nгo registrada\n\n{FF8000}Digite uma senha para registrar-se no servidor!", Strna, NomeaR, IPa);
        LoginMsg(playerid);
        ShowPlayerDialog(playerid, DialogRegister, DIALOG_STYLE_INPUT, "{00FF00}ж {FFFFFF}Registre-se em nosso servidor:", Strna, TXT_DialogRegisterButton1, TXT_DialogButtonCancel);
    }

    // Tas casas foram carregados, mas nгo os carros, tгo alto todos os veнculos designados para as casas de jogadores
    for (new HouseSlot; HouseSlot < MAX_HOUSESPERPLAYER; HouseSlot++)
    {
        // Obter o houseid desta ranhura
        HouseID = APlayerData[playerid][Houses][HouseSlot];
        // Verifique se hб uma casa neste slot
        if (HouseID != 0)
        {
            HouseFile_Load(HouseID, true); // Coloque os carros da casa
        }
    }
    /* --------------------------------------------------------*/
    // Text Draw box mission
    /* --------------------------------------------------------*/
    APlayerData[playerid][MissionText] = TextDrawCreate(320.0, 430.0, " "); // Configurar o texto missгo, na parte inferior da tela
    TextDrawAlignment(APlayerData[playerid][MissionText], 2); // Alinhar o texto missгo ao centro
    TextDrawFont(APlayerData[playerid][MissionText], 2);
    TextDrawLetterSize(APlayerData[playerid][MissionText], 0.260000, 1.400000);
    TextDrawColor(APlayerData[playerid][MissionText], -1);
    TextDrawSetProportional(APlayerData[playerid][MissionText], 1);
    TextDrawSetShadow(APlayerData[playerid][MissionText], 1);
    TextDrawUseBox(APlayerData[playerid][MissionText], 1); // Definir o texto missгo de mostrar dentro de uma caixa
    TextDrawBoxColor(APlayerData[playerid][MissionText], 0x386DFF11); // Defina a cor da caixa de texto 0000FF missгo
    TextDrawSetOutline(APlayerData[playerid][MissionText], 1);

    /* --------------------------------------------------------*/
    // MSG LOGAR
    /* --------------------------------------------------------*/
    SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SendClientMessage(playerid, -1, "");
    SendClientMessage(playerid, -1, "                  Brasil Auto Mais Caminhoneiro             ");
    SendClientMessage(playerid, -1, "");
    SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        //Frase
    new file [ 50 ],
                    tito [ 100 ];

    CkeckNick ( playerid ) ;

    format ( file , sizeof ( file ) , NFST , PlayerNameF[ playerid ] ) ;

    if( !DOF2_FileExists ( file ) )
    {
        DOF2_CreateFile ( file );
        DOF2_SetString ( file , "Frase",  "Sem Frase Brasil Auto Mais Caminhoneiro" ) ;
        DOF2_SaveFile();
    }

    format ( tito , sizeof ( tito ) , "{00ff00}Frase ao Conectar de %s:{0000FF} %s ", PlayerNameF[ playerid ] , DOF2_GetString ( file , "Frase" ) ) ;
    SendClientMessageToAll ( -1 , tito);
//__________________________________
    return 1;
}
/* --------------------------------------------------------*/
// //Esta funзгo mostra o jogador quanto tempo sua proibiзгo ainda й quando ele tenta fazer o login (em dias, horas, minutos, segundos)
/* --------------------------------------------------------*/
ShowRemainingBanTime(playerid)
{
    // Configurar as variбveis locais
    new TotalBanTime, Days, Hours, Minutes, Seconds, Msg[128];

    // Obter o total de ban-tempo
    TotalBanTime = APlayerData[playerid][BanTime] - gettime();

    // calcular os dias
    if (TotalBanTime >= 86400)
    {
        Days = TotalBanTime / 86400;
        TotalBanTime = TotalBanTime - (Days * 86400);
    }
    // Calculate hours
    if (TotalBanTime >= 3600)
    {
        Hours = TotalBanTime / 3600;
        TotalBanTime = TotalBanTime - (Hours * 3600);
    }
    // Calculate minutes
    if (TotalBanTime >= 60)
    {
        Minutes = TotalBanTime / 60;
        TotalBanTime = TotalBanTime - (Minutes * 60);
    }
    // Calculate seconds
    Seconds = TotalBanTime;

    // Apresentar o restante tempo proibiзгo para este jogador
    SendClientMessage(playerid, 0xFFFFFFFF, "» {999999}Vocк estб {FF0000}banido {999999}do servidor!");
    format(Msg, 128, "» {FF0000}Faltam: Dias: %i, Horas: %i, Minutos: %i, Segundos: %i", Days, Hours, Minutes, Seconds);
    SendClientMessage(playerid, 0xFFFFFFFF, Msg);
}
Reply
#7

pawn Код:
public OnPlayerConnect(playerid)
{
    //VIP
    LoadPlayerVIP(playerid);
    //________
    new samp[128];
    GetPlayerVersion(playerid, samp, 128);
    if(strcmp(samp, "unknown", false) == 0)
        return BanEx(playerid, "BOT"); //Proteзгo by NicK

    //Mudarnick
    MudarNick[playerid] = false;
    //Musica
    PlayerPlaySound(playerid, 1185, 0, 0, 0);
    //Escudo
    Equipamentos[playerid] = 0;
    //afk
    g_AFK[playerid] = false; // Definir g_AFK para false.
    //chat kill
    SendDeathMessage(INVALID_PLAYER_ID, playerid, 200);
    //loteria
    _BilheteComprado[playerid] = 0;
    /*ClassRank[playerid] = Create3DTextLabel(RankPlayer, 0x067D00FF, 0.0, 0.0, 0.0, 30.0, 0,1);*/
    /* -----------------------------------------------------------------------------------------------------*/
    // Tempo conectado /admins
    /* -----------------------------------------------------------------------------------------------------*/
    APlayerData[playerid][TempoConectado] = 0;
    GPSCasa[playerid] = false;
    /* -----------------------------------------------------------------------------------------------------*/
    // Get info da INC geoip
    /* -----------------------------------------------------------------------------------------------------
    GetPlayerGeoIP(playerid);*/

    /* -----------------------------------------------------------------------------------------------------*/
    // Speedometer setup
    /* -----------------------------------------------------------------------------------------------------*/
    Speedometer_Setup(playerid);

    /* -----------------------------------------------------------------------------------------------------*/
    // Remove objetos do desvio do tunel de SANTA MARIA LS
    /* -----------------------------------------------------------------------------------------------------*/
    RemoveBuildingForPlayer(playerid, 762, 1023.5938, -2050.6875, 16.0859, 0.25);
    RemoveBuildingForPlayer(playerid, 762, 1011.8594, -2043.5000, 16.0859, 0.25);
    /* -----------------------------------------------------------------------------------------------------*/
    // Textdraw /skin 0.3x
    /* -----------------------------------------------------------------------------------------------------*/
    gHeaderTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gBackgroundTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gCurrentPageTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gNextButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gPrevButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    for(new x=0; x < SELECTION_ITEMS; x++)
    {
        gSelectionItems[playerid][x] = PlayerText:INVALID_TEXT_DRAW;
    }
 /* --------------------------------------------------------*/
    // Text Draw reloginho
    /* --------------------------------------------------------*/

    gItemAt[playerid] = 0;
 /* --------------------------------------------------------*/
    // Cabelo
    /* --------------------------------------------------------*/
    pHairSlot[playerid] = -1;
    /* --------------------------------------------------------*/
    // A
    /* --------------------------------------------------------*/
    if(!IsPlayerNPC(playerid)) pObject[playerid][slotreserved] = false;
    /* --------------------------------------------------------*/
    // Le o PM
    /* --------------------------------------------------------*/
    LerPms[playerid] = false;
    /* --------------------------------------------------------*/
    // Bloqueia pm
    /* --------------------------------------------------------*/
    PmBlock[playerid] = false;
    /* --------------------------------------------------------*/
    // Verifica se esta no evento
    /* --------------------------------------------------------*/
    PlayerInfo[playerid][NoEvento] = 0;
    /* --------------------------------------------------------*/
    // Verifica se estб no carro
    /* --------------------------------------------------------*/
    PlayerInfo[playerid][Carro] = 0;
    /* --------------------------------------------------------*/
    // CHECA SE O PLAYER ESTБ BANIDO
    /* --------------------------------------------------------*/
    ChecarBan(playerid);
    /* --------------------------------------------------------*/
    // Ultimo Login
    /* --------------------------------------------------------*/
    APlayerData[playerid][UltimoLogin] = 0;
    /* --------------------------------------------------------*/
    // Objetos removidos ''Doherty''
    /* --------------------------------------------------------*/
    RemoveBuildingForPlayer(playerid, 11091, -2133.5547, -132.7031, 36.1328, 0.25);
    RemoveBuildingForPlayer(playerid, 11376, -2144.3516, -132.9609, 38.3359, 0.25);
    RemoveBuildingForPlayer(playerid, 11011, -2144.3516, -132.9609, 38.3359, 0.25);
    RemoveBuildingForPlayer(playerid, 11009, -2128.5391, -142.8438, 39.1406, 0.25);
    RemoveBuildingForPlayer(playerid, 1278, -2137.6172, -110.9375, 48.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 16615, -389.7656, 1515.1641, 74.5547, 0.25);
    RemoveBuildingForPlayer(playerid, 16616, -326.6953, 1541.3906, 74.5547, 0.25);
    RemoveBuildingForPlayer(playerid, 16751, -324.1484, 1302.2266, 52.6641, 0.25);
    RemoveBuildingForPlayer(playerid, 16143, -324.1484, 1302.2266, 52.6641, 0.25);
    RemoveBuildingForPlayer(playerid, 16144, -324.1484, 1302.2266, 52.6641, 0.25);
    RemoveBuildingForPlayer(playerid, 16137, -389.7656, 1515.1641, 74.5547, 0.25);
    RemoveBuildingForPlayer(playerid, 16138, -326.6953, 1541.3906, 74.5547, 0.25);
    //Avenida Lv e Obejtos dO Resgate Chegando Em Ls
    RemoveBuildingForPlayer(playerid, 11372, -2076.4375, -107.9297, 36.9688, 0.25);
    RemoveBuildingForPlayer(playerid, 11014, -2076.4375, -107.9297, 36.9688, 0.25);
    RemoveBuildingForPlayer(playerid, 9120, 2027.3906, 833.1172, 5.8750, 0.25);
    RemoveBuildingForPlayer(playerid, 9160, 2027.3906, 833.1172, 5.8750, 0.25);
    RemoveBuildingForPlayer(playerid, 1438, -109.1641, -1181.3438, 1.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1438, -84.2422, -1180.2656, 0.8516, 0.25);
    RemoveBuildingForPlayer(playerid, 1415, -77.2188, -1188.3672, 0.8359, 0.25);
    RemoveBuildingForPlayer(playerid, 1676, -92.1016, -1161.7891, 2.9609, 0.25);
    RemoveBuildingForPlayer(playerid, 1676, -97.0703, -1173.7500, 3.0313, 0.25);
    RemoveBuildingForPlayer(playerid, 1440, -103.6875, -1172.5781, 2.2656, 0.25);
    RemoveBuildingForPlayer(playerid, 17065, -90.1953, -1169.6719, 5.3125, 0.25);
    RemoveBuildingForPlayer(playerid, 1676, -85.2422, -1165.0313, 2.6328, 0.25);
    RemoveBuildingForPlayer(playerid, 1676, -90.1406, -1176.6250, 2.6328, 0.25);
    RemoveBuildingForPlayer(playerid, 17064, -75.4688, -1174.5469, 0.8750, 0.25);
    RemoveBuildingForPlayer(playerid, 1438, -77.4219, -1165.5547, 1.0234, 0.25);
    RemoveBuildingForPlayer(playerid, 1447, -89.9297, -1133.7500, 1.3906, 0.25);
    RemoveBuildingForPlayer(playerid, 1438, -87.0547, -1132.6797, 0.0469, 0.25);
    RemoveBuildingForPlayer(playerid, 1462, -79.2500, -1137.7188, 0.0547, 0.25);
    RemoveBuildingForPlayer(playerid, 3285, -73.8047, -1141.4219, 1.9844, 0.25);
    RemoveBuildingForPlayer(playerid, 1462, -84.3750, -1116.0938, 0.2578, 0.25);
    RemoveBuildingForPlayer(playerid, 1447, -84.0547, -1117.2188, 1.3906, 0.25);
    RemoveBuildingForPlayer(playerid, 1462, -60.3594, -1116.9375, 0.2578, 0.25);
    RemoveBuildingForPlayer(playerid, 1438, -63.6719, -1125.6953, 0.0469, 0.25);
    RemoveBuildingForPlayer(playerid, 1438, -63.4141, -1115.4141, 0.0469, 0.25);
/*  //Agencia Bancбria SF
    RemoveBuildingForPlayer(playerid, 10317, -2655.1250, -15.4219, 23.8125, 0.25);
    RemoveBuildingForPlayer(playerid, 10368, -2655.1250, -15.4219, 23.8125, 0.25);
    RemoveBuildingForPlayer(playerid, 10716, -2655.1250, -15.4219, 23.8125, 0.25);
    */

    GetPlayerGeoIP(playerid);
    /* --------------------------------------------------------*/
    // Sempre permitir NPCs fazer o login sem senha ou conta
    /* --------------------------------------------------------*/
    if(IsPlayerNPC(playerid))
            return 1;
    /* --------------------------------------------------------*/
    // Configurar as variбveis ??locais
    /* --------------------------------------------------------*/
    new Name[MAX_PLAYER_NAME], HouseID;
    /* -----------------------------------------------------------------------------------------------------------------------*/
    // // Configurar um PVR para permitir cross-script de dinheiro-transferкncias (somente a partir filterscript para este script principal) e marcar pontos
    /* -----------------------------------------------------------------------------------------------------------------------*/
    SetPVarInt(playerid, "PVarMoney", 0);
    SetPVarInt(playerid, "PVarScore", 0);
    GetPlayerName(playerid, Name, sizeof(Name));
    GetPlayerName(playerid, APlayerData[playerid][PlayerName], 24);
    new serial[128], Ip[25];
    GetPlayerIp(playerid, Ip, sizeof(Ip));
    /* --------------------------------------------------------*/
    // Serial BAN
    /* --------------------------------------------------------*/
    gpci(playerid, serial, sizeof(serial));
    new Stringw[800], NomeR[34], IP[30], Strna[800], IPa[30], NomeaR[34];
    if(DOF2_IsSet("ServerData/BanSerial.txt", serial))
    {
        new JogadorNome[24], String[512];
        GetPlayerIp(playerid, Ip, sizeof(Ip));
        GetPlayerName(playerid, JogadorNome, sizeof(JogadorNome));
        format(String, sizeof(String), "\n                {FFFFFF}*~*Informaзхes Sobre o Banimento *~*\n\nVocк estб Banido Permanentemente do Servidor (AMC)\nCaso Ache isso um BUG Faзa Revisгo em Nosso Forum!!\n\n\n{FF0000}Seus Dados:\n\n{CCCCCC}Seu Nome: {FFFFFF}%s\n{CCCCCC}Seu IP: {FFFFFF}%s\n{CCCCCC}Seu Serial: {FFFFFF}%s\n\n\n\n{CCCCCC}Forum: {FFFF00}automais.sampforum.net", JogadorNome, Ip, serial, DOF2_GetString("ServerData/BanSerial.txt", serial));
        ShowPlayerDialog(playerid, DIALOG_BANIDO, DIALOG_STYLE_MSGBOX, "{00FF00}ж {FFFFFF}Banido permanentemente!", String, "Fechar", "");
        return 1;
    }      
    else if(PlayerFile_Load(playerid) == 1)
    {
        GetPlayerName(playerid, NomeR, sizeof(NomeR));
        GetPlayerIp(playerid, IP, 30);
        new dia, mes, hora, minuto;
        dia = DOF2_GetInt(ObterConta(playerid), "Dia");
        mes = DOF2_GetInt(ObterConta(playerid), "Mes");
        hora = DOF2_GetInt(ObterConta(playerid), "Hora");
        minuto = DOF2_GetInt(ObterConta(playerid), "Minuto");
        format(Stringw, sizeof(Stringw), "%s{FF8000}» Auto Mais Caminhoneiro «\n\n{999999}Sua Conta: {FFFFFF}%s\n{999999}Seu IP: {FFFFFF}%s\n{999999}Status: {00FF00}Registrada\n{999999}Ultimo Login:{FFFFFF}%s~%s~%s>%s %d:%d:%d:%d:%d:%d: %s<%s~%s~%s \n\n{838B8B}\n\n{FF8000}Digite sua senha para logar!", Stringw, NomeR, IP, dia, mes, hora, minuto, Hora, Minuto, Segundo, Dia, Mes, Ano);
  //    Verifique se o jogador ainda й proibido
        if (APlayerData[playerid][BanTime] < gettime()) // Jogador ban-tempo й passado
            ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_PASSWORD, "{00FF00}ж {FFFFFF}Insira sua senha para logar:", Stringw, TXT_DialogLoginButton1, TXT_DialogButtonCancel);
        else // Jogador ainda й proibido
        {
            ShowRemainingBanTime(playerid); // Mostrar o restante tempo proibiзгo para o jogador й dias, horas, minutos, segundos
            Kick(playerid); // Chute o jogador
        }
    }
   
    else if (PlayerFile_Load(playerid) == 0)
    {
        GetPlayerName(playerid, NomeaR, sizeof(NomeaR));
        GetPlayerIp(playerid, IPa, 30);
        format(Strna, sizeof(Strna), "%s{FF8000}» Auto Mais Caminhoneiro «\n\n{999999}Sua Conta: {FFFFFF}%s\n{999999}Seu IP: {FFFFFF}%s\n{999999}Status: {FF0000}Nгo registrada\n\n{FF8000}Digite uma senha para registrar-se no servidor!", Strna, NomeaR, IPa);
        LoginMsg(playerid);
        ShowPlayerDialog(playerid, DialogRegister, DIALOG_STYLE_INPUT, "{00FF00}ж {FFFFFF}Registre-se em nosso servidor:", Strna, TXT_DialogRegisterButton1, TXT_DialogButtonCancel);
    }
    // Tas casas foram carregados, mas nгo os carros, tгo alto todos os veнculos designados para as casas de jogadores
    for (new HouseSlot; HouseSlot < MAX_HOUSESPERPLAYER; HouseSlot++)
    {
        // Obter o houseid desta ranhura
        HouseID = APlayerData[playerid][Houses][HouseSlot];
        // Verifique se hб uma casa neste slot
        if (HouseID != 0)
        {
            HouseFile_Load(HouseID, true); // Coloque os carros da casa
        }
    }
    /* --------------------------------------------------------*/
    // Text Draw box mission
    /* --------------------------------------------------------*/
    APlayerData[playerid][MissionText] = TextDrawCreate(320.0, 430.0, " "); // Configurar o texto missгo, na parte inferior da tela
    TextDrawAlignment(APlayerData[playerid][MissionText], 2); // Alinhar o texto missгo ao centro
    TextDrawFont(APlayerData[playerid][MissionText], 2);
    TextDrawLetterSize(APlayerData[playerid][MissionText], 0.260000, 1.400000);
    TextDrawColor(APlayerData[playerid][MissionText], -1);
    TextDrawSetProportional(APlayerData[playerid][MissionText], 1);
    TextDrawSetShadow(APlayerData[playerid][MissionText], 1);
    TextDrawUseBox(APlayerData[playerid][MissionText], 1); // Definir o texto missгo de mostrar dentro de uma caixa
    TextDrawBoxColor(APlayerData[playerid][MissionText], 0x386DFF11); // Defina a cor da caixa de texto 0000FF missгo
    TextDrawSetOutline(APlayerData[playerid][MissionText], 1);

    /* --------------------------------------------------------*/
    // MSG LOGAR
    /* --------------------------------------------------------*/
    SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SendClientMessage(playerid, -1, "");
    SendClientMessage(playerid, -1, "                  Brasil Auto Mais Caminhoneiro             ");
    SendClientMessage(playerid, -1, "");
    SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        //Frase
    new file [ 50 ],
                    tito [ 100 ];

    CkeckNick ( playerid ) ;

    format ( file , sizeof ( file ) , NFST , PlayerNameF[ playerid ] ) ;

    if( !DOF2_FileExists ( file ) )
    {
        DOF2_CreateFile ( file );
        DOF2_SetString ( file , "Frase",  "Sem Frase Brasil Auto Mais Caminhoneiro" ) ;
        DOF2_SaveFile();
    }

    format ( tito , sizeof ( tito ) , "{00ff00}Frase ao Conectar de %s:{0000FF} %s ", PlayerNameF[ playerid ] , DOF2_GetString ( file , "Frase" ) ) ;
    SendClientMessageToAll ( -1 , tito);
    return 1;
}
Reply
#8

PT passei o PlayerConnect mas o q quero arrumar й isso

pawn Код:
new string[128], Nome_Player[24];
    GetPlayerName(playerid, Nome_Player, 24);
    format(string, 128, "%s [ID:%d] {00FF00}conectou-se {CCCCCC}ao Auto Mais Caminhoneiro!", Nome_Player, playerid);
    SendClientMessageToAll(-1, string);
    if(APlayerData[playerid][PlayerLevel] > 0)
    {
        format(string, sizeof(string), "{ff7c00}O Administrador {FFFFFF}%s{ff7c00} (ID: {FFFFFF}%i{ff7c00}){00FF00} Entrou{D7D7D7} no Servidor.", Nome_Player, playerid);
        SendClientMessageToAll(0xFF0000FF, string);
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "                  Brasil Auto Mais Caminhoneiro             ");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Administrador: {FF0000}Sim");
        new DName[MAX_PLAYER_NAME], Don[50];
        GetPlayerName(playerid,DName,sizeof(DName));
        format(Don,sizeof(Don),"~y~%s ~r~ON",DName);
        return 0;
    }
    if(APlayerData[playerid][PlayerName])
    {
        format(string, sizeof(string), "{ff7c00}O Jogador {FFFFFF}%s{ff7c00} (ID: {FFFFFF}%i{ff7c00}) Entrou no Servidor.", Nome_Player, playerid);
        SendClientMessageToAll(0xFF0000FF, string);
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "                  Brasil Auto Mais Caminhoneiro             ");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Administrador: {FF0000}Nгo");
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Player VIP: {FF0000}Nгo");
        return 0;
    }
    if (IsPlayerVIP(playerid))
    {
        format(string, sizeof(string), "{D7D7D7}O Jogador Vip {00FFFF}%s{D7D7D7} (ID: {00FFFF}%i{D7D7D7}){00FF00} Entrou{D7D7D7} no Servidor.", Nome_Player, playerid);
        SendClientMessageToAll(0xFF0000FF, string);
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "                  Brasil Auto Mais Caminhoneiro             ");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Administrador: {FF0000}Nгo");
        new DName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,DName,sizeof(DName));
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Player VIP: {FF0000}Sim");
        return 0;
    }
Todos estгo dando certo, menos o do VIP, quando o VIP entra nгo aparece

VIP=
pawn Код:
if (IsPlayerVIP(playerid))
    {
        format(string, sizeof(string), "{D7D7D7}O Jogador Vip {00FFFF}%s{D7D7D7} (ID: {00FFFF}%i{D7D7D7}){00FF00} Entrou{D7D7D7} no Servidor.", Nome_Player, playerid);
        SendClientMessageToAll(0xFF0000FF, string);
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "                  Brasil Auto Mais Caminhoneiro             ");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Administrador: {FF0000}Nгo");
        new DName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,DName,sizeof(DName));
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Player VIP: {FF0000}Sim");
        return 0;
    }
Reply
#9

UP AKI, ALguem me ajuda?
Reply
#10

Quote:
Originally Posted by GHLEMES
Посмотреть сообщение
PT passei o PlayerConnect mas o q quero arrumar й isso

pawn Код:
new string[128], Nome_Player[24];
    GetPlayerName(playerid, Nome_Player, 24);
    format(string, 128, "%s [ID:%d] {00FF00}conectou-se {CCCCCC}ao Auto Mais Caminhoneiro!", Nome_Player, playerid);
    SendClientMessageToAll(-1, string);
    if(APlayerData[playerid][PlayerLevel] > 0)
    {
        format(string, sizeof(string), "{ff7c00}O Administrador {FFFFFF}%s{ff7c00} (ID: {FFFFFF}%i{ff7c00}){00FF00} Entrou{D7D7D7} no Servidor.", Nome_Player, playerid);
        SendClientMessageToAll(0xFF0000FF, string);
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "                  Brasil Auto Mais Caminhoneiro             ");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Administrador: {FF0000}Sim");
        new DName[MAX_PLAYER_NAME], Don[50];
        GetPlayerName(playerid,DName,sizeof(DName));
        format(Don,sizeof(Don),"~y~%s ~r~ON",DName);
        return 0;
    }
    if(APlayerData[playerid][PlayerName])
    {
        format(string, sizeof(string), "{ff7c00}O Jogador {FFFFFF}%s{ff7c00} (ID: {FFFFFF}%i{ff7c00}) Entrou no Servidor.", Nome_Player, playerid);
        SendClientMessageToAll(0xFF0000FF, string);
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "                  Brasil Auto Mais Caminhoneiro             ");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Administrador: {FF0000}Nгo");
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Player VIP: {FF0000}Nгo");
        return 0;
    }
    if (IsPlayerVIP(playerid))
    {
        format(string, sizeof(string), "{D7D7D7}O Jogador Vip {00FFFF}%s{D7D7D7} (ID: {00FFFF}%i{D7D7D7}){00FF00} Entrou{D7D7D7} no Servidor.", Nome_Player, playerid);
        SendClientMessageToAll(0xFF0000FF, string);
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "                  Brasil Auto Mais Caminhoneiro             ");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Administrador: {FF0000}Nгo");
        new DName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,DName,sizeof(DName));
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Player VIP: {FF0000}Sim");
        return 0;
    }
Todos estгo dando certo, menos o do VIP, quando o VIP entra nгo aparece

VIP=
pawn Код:
if (IsPlayerVIP(playerid))
    {
        format(string, sizeof(string), "{D7D7D7}O Jogador Vip {00FFFF}%s{D7D7D7} (ID: {00FFFF}%i{D7D7D7}){00FF00} Entrou{D7D7D7} no Servidor.", Nome_Player, playerid);
        SendClientMessageToAll(0xFF0000FF, string);
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "                  Brasil Auto Mais Caminhoneiro             ");
        SendClientMessage(playerid, -1, "");
        SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Administrador: {FF0000}Nгo");
        new DName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,DName,sizeof(DName));
        SendClientMessage(playerid, 0xFF0000FF, "-  {a9c4e4}Player VIP: {FF0000}Sim");
        return 0;
    }
ta resumi isso tudo nisto:

pawn Код:
new string[128], Nome_Player[24];
    GetPlayerName(playerid, Nome_Player, 24);
    format(string, 128, "%s [ID:%d] {00FF00}conectou-se {CCCCCC}ao Auto Mais Caminhoneiro!", Nome_Player, playerid);
    SendClientMessageToAll(-1, string);
   
    if(APlayerData[playerid][PlayerLevel] > 0)
        format(string, sizeof(string), "{ff7c00}O Administrador {FFFFFF}%s{ff7c00} (ID: {FFFFFF}%i{ff7c00}){00FF00} Entrou{D7D7D7} no Servidor.", Nome_Player, playerid);
    else
        format(string, sizeof(string), "{ff7c00}O Jogador {FFFFFF}%s{ff7c00} (ID: {FFFFFF}%i{ff7c00}) Entrou no Servidor.", Nome_Player, playerid);
    SendClientMessageToAll(0xFF0000FF, string);
   
    SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SendClientMessage(playerid, -1, "");
    SendClientMessage(playerid, -1, "                  Brasil Auto Mais Caminhoneiro             ");
    SendClientMessage(playerid, -1, "");
    SendClientMessage(playerid, -1, "{FF0000}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
   
    format(string, sizeof(string), "-  {a9c4e4}Administrador: %s", APlayerData[playerid][PlayerLevel] > 0 ? ("{FF0000}Sim") : ("{FF0000}Nгo"));
    SendClientMessage(playerid, 0xFF0000FF, string);
    format(string, sizeof(string), "-  {a9c4e4}Player VIP: %s", IsPlayerVIP(playerid) ? ("{FF0000}Sim") : ("{FF0000}Nгo"));
    SendClientMessage(playerid, 0xFF0000FF, string);
   
    if(IsPlayerVIP(playerid))
    {
        format(string, sizeof(string), "{D7D7D7}O Jogador Vip {00FFFF}%s{D7D7D7} (ID: {00FFFF}%i{D7D7D7}){00FF00} Entrou{D7D7D7} no Servidor.", Nome_Player, playerid);
        SendClientMessageToAll(0xFF0000FF, string);
    }
teste
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)