[Ajuda] porque o parte do comando some ?
#1

quando vocк dar /admins


aparecer 2 admin e depois nгo parecer os outros ficar bugado


pawn Код:
if(strcmp(cmd, "/admins", true) == 0)
    {
        new str[10000], count = 0;

        if(IsPlayerConnected(playerid))
        {
         //SendClientMessage(playerid, TEAM_VAGOS_COLOR, "{FFA500}Nome: {FFFFFF}Need_Ziinho || {FFA500}Cargo: {FFFFFF}Administrador BOT || Status: {FF0000}(Trabalhando)");
            format(str, sizeof(str), "{FFA500}Nome: {FFFFFF}Need_Ziinho || {FFFFFF}Administrador BOT || Status: {FF0000}(Trabalhando)\n");
            strcat(string, str, sizeof(string));
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(admin[i])
                    {
                        if(pAdmin[i] == 1)
                        {
                            format(str, sizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Guardiгo] Level {FF0000} 1\n", GetPlayerNameEx(i), i);
                            strcat(string, str, sizeof(string));
                        }
                        if(pAdmin[i] == 2)
                        {
                            format(str, sizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[ADM] Level {FF0000} 2\n", GetPlayerNameEx(i), i);
                            strcat(string, str, sizeof(string));
                        }
                        if(pAdmin[i] == 3)
                        {
                            format(str, sizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Chefe] Level {FF0000} 3\n", GetPlayerNameEx(i), i);
                            strcat(string, str, sizeof(string));
                        }
                        if(pAdmin[i] == 4)
                        {
                            format(str, sizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Master-Chefe] Level {FF0000} 4\n", GetPlayerNameEx(i), i);
                            strcat(string, str, sizeof(string));
                        }
                        if(pAdmin[i] == 5)
                        {
                            format(str, sizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Sub-Dono] Level {FF0000} 5\n", GetPlayerNameEx(i), i);
                            strcat(string, str, sizeof(string));
                        }
                        if(pAdmin[i] == 6)
                        {
                            format(str, sizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Dono-Geral] Level {FF0000} 6\n", GetPlayerNameEx(i), i);
                            strcat(string, str, sizeof(string));
                        }
                        count++;
                    }
                }
            }
        }
        if(count == 0)
        {
            ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, ".:: - ADM's Online - ::.", "{FF0000}Nгo hб ADM's online no momento.\n\nVeja nossos Moderadores Use:/moderadores", "OK", "");
        }
        else
        {
            ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, ".:: - ADM's Online - ::.", string, "OK", "");
        }
        return 1;
Reply
#2

Mude:
pawn Код:
strcat(string, str, sizeof(string));
Para:

pawn Код:
strcat(str, string, sizeof(str));
Reply
#3

agr nгo apareceu o comando

pawn Код:
if(strcmp(cmd, "/admins", true) == 0)
    {
        new str[10000], count = 0;

        if(IsPlayerConnected(playerid))
        {
            format(str, sizeof(str), "{FFA500}Nome: {FFFFFF}Need_Ziinho || {FFFFFF}Administrador BOT || Status: {FF0000}(Trabalhando)\n");
            strcat(str, string, sizeof(str));
           
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(admin[i])
                    {
                        if(pAdmin[i] == 1)
                        {
                            format(str, sizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Guardiгo] Level {FF0000} 1\n", GetPlayerNameEx(i), i);
                            strcat(str, string, sizeof(str));
                        }
                        if(pAdmin[i] == 2)
                        {
                            format(str, sizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[ADM] Level {FF0000} 2\n", GetPlayerNameEx(i), i);
                            strcat(str, string, sizeof(str));
                        }
                        if(pAdmin[i] == 3)
                        {
                            format(str, sizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Chefe] Level {FF0000} 3\n", GetPlayerNameEx(i), i);
                            strcat(str, string, sizeof(str));
                        }
                        if(pAdmin[i] == 4)
                        {
                            format(str, sizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Master-Chefe] Level {FF0000} 4\n", GetPlayerNameEx(i), i);
                            strcat(str, string, sizeof(str));
                        }
                        if(pAdmin[i] == 5)
                        {
                            format(str, sizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Sub-Dono] Level {FF0000} 5\n", GetPlayerNameEx(i), i);
                            strcat(str, string, sizeof(str));
                        }
                        if(pAdmin[i] == 6)
                        {
                            format(str, sizeof(str), "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Dono-Geral] Level {FF0000} 6\n", GetPlayerNameEx(i), i);
                            strcat(str, string, sizeof(str));
                        }
                        count++;
                    }
                }
            }
        }
        if(count == 0)
        {
            ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, ".:: - ADM's Online - ::.", "{FF0000}Nгo hб ADM's online no momento.\n\nVeja nossos Moderadores Use:/moderadores", "OK", "");
        }
        else
        {
            ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, ".:: - ADM's Online - ::.", string, "OK", "");
        }
        return 1;
Reply
#4

pawn Код:
strcat(string, str, sizeof(str));
Reply
#5

pawn Код:
if(strcmp(cmd, "/admins", true) == 0)
{
    new str[1000], strAUX[128], count = 0;

    format(strAUX, 128, "{FFA500}Nome: {FFFFFF}Need_Ziinho || {FFFFFF}Administrador BOT || Status: {FF0000}(Trabalhando)\n");
    strcat(str, strAUX);
   
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(admin[i] > 0)
            {
                if(pAdmin[i] == 1)
                {
                    format(strAUX, 128, "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Guardiгo] Level {FF0000} 1\n", GetPlayerNameEx(i), i);
                    strcat(str, strAUX);
                }
                if(pAdmin[i] == 2)
                {
                    format(strAUX, 128, "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[ADM] Level {FF0000} 2\n", GetPlayerNameEx(i), i);
                    strcat(str, strAUX);
                }
                if(pAdmin[i] == 3)
                {
                    format(strAUX, 128, "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Chefe] Level {FF0000} 3\n", GetPlayerNameEx(i), i);
                    strcat(str, strAUX);
                }
                if(pAdmin[i] == 4)
                {
                    format(strAUX, 128, "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Master-Chefe] Level {FF0000} 4\n", GetPlayerNameEx(i), i);
                    strcat(str, strAUX);
                }
                if(pAdmin[i] == 5)
                {
                    format(strAUX, 128, "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Sub-Dono] Level {FF0000} 5\n", GetPlayerNameEx(i), i);
                    strcat(str, strAUX);
                }
                if(pAdmin[i] == 6)
                {
                    format(strAUX, 128, "{FFFFFF}%s (%d) {FF0000}:: {FFFFFF}[Dono-Geral] Level {FF0000} 6\n", GetPlayerNameEx(i), i);
                    strcat(str, strAUX);
                }
                count++;
            }
        }
    }

    if(count == 0)
    {
        ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, ".:: - ADM's Online - ::.", "{FF0000}Nгo hб ADM's online no momento.\n\nVeja nossos Moderadores Use:/moderadores", "OK", "");
    }
    else
    {
        ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, ".:: - ADM's Online - ::.", str, "OK", "");
    }
    return 1;
}
Reply
#6

tenho esse aki tambem , so aparecer uma messagem queria que aparece -se as duas
ja tentei com string separadas e nгo deu ai minha ultima opiзгo com as mesma string de uma olhada !

pawn Код:
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
            if(dini_Int(file, "rouboubanco") == 0)
            {
                if(dini_Int(file, "Profissao") == Assaltante || dini_Int(file, "aAdmin") == 1 || PlayerInfo[playerid][ZCON] == true)
                {
                    new Float:x, Float:y, Float:z;
                   
                    new string2[256];

                    dini_IntSet(file, "Procurado", 1);
                    dini_IntSet(file, "rouboubanco", 1);
                    Procurados[playerid]= 1;

                    SetPlayerWantedLevel(playerid, 6);
                    GivePlayerGrana(playerid, 2500);

                    GetPlayerPos(playerid, x, y, z);
                    SetTimerEx("CriarExplosao", 2500, false, "fffdf", x, y, z, 2, 50.0);

                    GameTextForPlayer(playerid, "~r~Assalto Efetuado ~g~+$2500", 1000, 4);
                    // essa nгo aparecer
format(string2, sizeof(string2), "{FFFFFF} [ {7FFF00} BANCO ] {FFFFFF}  O(A) bandido(a) {7FFF00}%s {FFFFFF}assaltou o banco e estб sendo procurado(a){7FFF00}[Recompensa] 5 mil! ", GetPlayerNameEx(playerid));
                    SendClientMessageToAll(msgdm, string2);
                   
                    // essa jб funcionar normal
format(string2, sizeof(string2), "[{00F5FF}Cвmera{FFFFFF}] Fragaram bandido {00F5FF}%s {FFFFFF}assaltando o banco e estб sendo procurado(a) pela polнcia!", GetPlayerNameEx(playerid));
                    SendClientMessageToAll(msgdm, string2);
                }
                else
                {
                    SendClientMessage(playerid, Vermelho, "Voce nгo й assaltante!");
                }
            }
            else
            {
                SendClientMessage(playerid, Vermelho, "Vocк jб assalto o banco aguarde vocк upar!");
            }
        }
    }
Reply
#7

alguйm ?
Reply
#8

Quote:
Originally Posted by Dieguinho
Посмотреть сообщение
alguйm ?
O limite de caracteres de SendClientMessage/SendClientMessageToAll se nгo me engano й de 144!
Reply
#9

ok mais ai o que tenho quer fazer ?
Reply
#10

Quote:
Originally Posted by Dieguinho
Посмотреть сообщение
ok mais ai o que tenho quer fazer ?
Parece meio que уbvio mas enfim.

Tente reduzir o tamanho do texto.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)