Dialogo no se muestra en OnPlayerConnect
#1

hola quisiera saber por que no se muestra solo continua como si nada y no sale el dialogo

pawn Код:
public OnPlayerConnect(playerid)
{
    new r1[] = "Recuerda cumplir estas reglas para evitar sanciones y molestias";
    new r2[] = "\n\n1)No usar cheats, mods cheats o hacks al juego que se considere cheat";
    new r3[] = "\nesto perjudica a otros usuarios y podrias obtener un ban por esto.";
    new r4[] = "\n\n2)No hagas spam (publicidad ajena al server) o flood (repetir";
    new r5[] = "\nlo mismo en el chat) spam = ban, flood = severa sanciуn";
    new r6[] = "\n\n3)No hagas ck, db o hk:";
    new r7[] = "\nCk = car kill (atropellar o chocar con autos), Db = drive be (disparar";
    new r8[] = "\ndesde un vehiculo siendo pasajero o conductor)";
    new r9[] = "\n\n4)No exigas respeto si no respteas a los demas = Todos se respetan";
    new r10[] = "\n,no de discriminaciуn ni insultos tampoco ofensas";
    new r11[] = "\n\n5)No abuses de bugs (errores en el servidor) que te beneficien";
    new r12[] = "\n\n6)No reportes a alguien que imcumpla las reglas por el chat";
    new r13[] = "\nusa /REPORTAR";
    new r14[] = "\n\n{F04040}Al aceptar las reglas, aceptas haberlas leido y estar sometido";
    new r15[] = "\nbajo cualquier sanciуn por imcumplirlas";
    new r16[] = "\n\n\n{5145FF}";
    new reglas[1000];
    format(reglas, sizeof reglas, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16);
    //==========DIALOGO AL INGRESAR===========================//
    ShowPlayerDialog(playerid, 232, DIALOG_STYLE_MSGBOX, ".::::.", reglas, "Aceptar", "No Aceptar");
    //========================================================//
    PlayerInfo[playerid][Deaths] = 0;
    PlayerInfo[playerid][Kills] = 0;
    PlayerInfo[playerid][Jailed] = 0;
    PlayerInfo[playerid][Frozen] = 0;
    PlayerInfo[playerid][Level] = 0;
    PlayerInfo[playerid][LoggedIn] = 0;
    PlayerInfo[playerid][Registered] = 0;
    PlayerInfo[playerid][God] = 0;
    PlayerInfo[playerid][GodCar] = 0;
    PlayerInfo[playerid][TimesSpawned] = 0;
    PlayerInfo[playerid][Muted] = 0;
    PlayerInfo[playerid][MuteWarnings] = 0;
    PlayerInfo[playerid][Warnings] = 0;
    PlayerInfo[playerid][Caps] = 0;
    PlayerInfo[playerid][DoorsLocked] = 0;
    PlayerInfo[playerid][pCar] = -1;
    for(new i; i<PING_MAX_EXCEEDS; i++) PlayerInfo[playerid][pPing][i] = 0;
    PlayerInfo[playerid][SpamCount] = 0;
    PlayerInfo[playerid][SpamTime] = 0;
    PlayerInfo[playerid][PingCount] = 0;
    PlayerInfo[playerid][PingTime] = 0;
    PlayerInfo[playerid][FailLogin] = 0;
    PlayerInfo[playerid][ConnectTime] = gettime();
    //------------------------------------------------------
    new PlayerName[MAX_PLAYER_NAME], string[128], str[128], file[256];
    GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
    new tmp3[50]; GetPlayerIp(playerid,tmp3,50);
    //-----------------------------------------------------
    if(ServerInfo[ConnectMessages] == 1)
    {
        new pAKA[256]; pAKA = dini_Get("ladmin/config/aka.txt",tmp3);
        if (strlen(pAKA) < 3) format(str,sizeof(str),"*** %s (%d) ha entrado al servidor", PlayerName, playerid);
        else if (!strcmp(pAKA,PlayerName,true)) format(str,sizeof(str),"*** %s (%d) ha entrado al servidor", PlayerName, playerid);
        else format(str,sizeof(str),"*** %s (%d) ha entrado al servidor (aka %s)", PlayerName, playerid, pAKA );

        for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && playerid != i)
        {
            if(PlayerInfo[i][Level] > 2) SendClientMessage(i,grey,str);
            else {
                format(string,sizeof(string),"*** %s (%d) ha entrado al servidor", PlayerName, playerid);
                SendClientMessage(i,grey,string);
                SendClientMessage(playerid, yellow, "Este servidor esta usando LAdmin4v2 traducido por bruunosoniico.");
                SendClientMessage(playerid, yellow, "Para descargarlo, ingresa a www.pawnoscripting.com");
            }
        }
    }
    //-----------------------------------------------------
    if (dUserINT(PlayerName2(playerid)).("banned") == 1)
    {
        SendClientMessage(playerid, red, "Este nombre esta baneado de este servidor!");
        format(string,sizeof(string),"%s ID:%d ha sido auto kickeado. Razon: Nombre baneado del servidor",PlayerName,playerid);
        SendClientMessageToAll(grey, string);  print(string);
        SaveToFile("KickLog",string);  Kick(playerid);
    }
    //-----------------------------------------------------
    if(ServerInfo[NameKick] == 1) {
        for(new s = 0; s < BadNameCount; s++) {
            if(!strcmp(BadNames[s],PlayerName,true)) {
                SendClientMessage(playerid,red, "Tu nombre esta en nuestra lista negra, has sido kickeado.");
                format(string,sizeof(string),"%s ID:%d ha sido auto kickeado. (Razon: Nombre prohibido)",PlayerName,playerid);
                SendClientMessageToAll(grey, string);  print(string);
                SaveToFile("KickLog",string);  Kick(playerid);
                return 1;
            }
        }
    }
    //-----------------------------------------------------
    if(ServerInfo[PartNameKick] == 1) {
        for(new s = 0; s < BadPartNameCount; s++) {
            new pos;
            while((pos = strfind(PlayerName,BadPartNames[s],true)) != -1) for(new i = pos, j = pos + strlen(BadPartNames[s]); i < j; i++)
            {
                SendClientMessage(playerid,red, "Su nombre no esta permitido en este servidor, has sido kickeado.");
                format(string,sizeof(string),"%s ID:%d ha sido auto kickeado. (Razon: Nombre prohibido)",PlayerName,playerid);
                SendClientMessageToAll(grey, string);  print(string);
                SaveToFile("KickLog",string);  Kick(playerid);
                return 1;
            }
        }
    }
    //-----------------------------------------------------
    if(ServerInfo[Locked] == 1) {
        PlayerInfo[playerid][AllowedIn] = false;
        SendClientMessage(playerid,red,"El Servidor esta Bloqueado!  Tienes 20 segundos para ingresar la contraseсa del servidor antes de ser kickeado!");
        SendClientMessage(playerid,red,"Tipea /password [contraseсa]");
        LockKickTimer[playerid] = SetTimerEx("AutoKick", 20000, 0, "i", playerid);
    }
    //-----------------------------------------------------
    if(strlen(dini_Get("ladmin/config/aka.txt", tmp3)) == 0) dini_Set("ladmin/config/aka.txt", tmp3, PlayerName);
    else
    {
        if( strfind( dini_Get("ladmin/config/aka.txt", tmp3), PlayerName, true) == -1 )
        {
            format(string,sizeof(string),"%s,%s", dini_Get("ladmin/config/aka.txt",tmp3), PlayerName);
            dini_Set("ladmin/config/aka.txt", tmp3, string);
        }
    }
    //-----------------------------------------------------
    if(!udb_Exists(PlayerName2(playerid))) SendClientMessage(playerid,orange, "CUENTA: Tipea /register [contraseсa] para crear una cuenta");
    else
    {
        PlayerInfo[playerid][Registered] = 1;
        format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(PlayerName));
        new tmp2[256]; tmp2 = dini_Get(file,"ip");
        if( (!strcmp(tmp3,tmp2,true)) && (ServerInfo[AutoLogin] == 1) )
        {
            LoginPlayer(playerid);
            if(PlayerInfo[playerid][Level] > 0)
            {
                format(string,sizeof(string),"CUENTA: Has sido automaticamente logueado. (Nivel %d)", PlayerInfo[playerid][Level] );
                SendClientMessage(playerid,green,string);
            }
            else SendClientMessage(playerid,green,"CUENTA: Has sido automaticamente logueado.");
        }
        else SendClientMessage(playerid, green, "CUENTA: Este nombre esta registrado,  puedes loguearte tipeando /login [contraseсa]");
    }
    return 1;
}
ayuda
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)