[Ajuda] Ajuda /orgs
#1

Olб gostaria de um tutorial para eu criar minhas orgs coloridas e com nome dos lнderes
pawn Код:
1-Policia Militar LS\n2-Rotam LS\n3 - Forзas Armadas\n4 - Mйdicos LS\n5 - Aztecas LS\n6 - Guerrilheiros Israelitas\n7 - Prefeito LS\n 8 - Hitmans\n9 - Los Santos News\n10 - Taxista\n11 - Policia Federal\n12 - Mбfia Cosa Nostra\n13 - Mбfia Yakuza\n14 - Groove LS\n15 - F.A.R.C\n17 - Ballas LS\n18 - Vagos LS\n19 - Comando Vermelho LS\n20 - Sons of Anarchy\n21 - Drifters\n 22 - Triads 23 - PCC LS\n24 - Groove SF\n25 - Vagos SF\n26 - PCC SF\n27 - Mйdicos SF\n28 - Comando Vermelho SF\n29 - Ballas SF\n30 - Prefeito SF\n31 - Aztecas SF\n32 - San Fierro News\n33 - Taxista SF\n34 - Policia Militar SF\n35 - Rotam SF


Sou Newba em pawn poderiam criar e explicar as funзхes?
esse й o /orgs original que nгo й em dialog
pawn Код:
if(strcmp(cmd, "/orgs", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
                SendClientMessage(playerid, VERDE2, "|__________________________ Orgs __________________________|");
                format(string, 128, " 1 - Policia Militar LS: %s", InfoOrg[1][Lider]);
                SendClientMessage(playerid, COR_PM, string);
                format(string, 128, " 2 - Rotam: %s", InfoOrg[2][Lider]);
                SendClientMessage(playerid, COR_ROTAM, string);
                format(string, 128, " 3 - Forзas Armadas: %s", InfoOrg[3][Lider]);
                SendClientMessage(playerid, COR_EXE, string);
                format(string, 128, " 4 - Mйdicos LS: %s", InfoOrg[4][Lider]);
                SendClientMessage(playerid, COR_MEDE, string);
                format(string, 128, " 5 - Aztecas LS: %s", InfoOrg[5][Lider]);
                SendClientMessage(playerid, COR_AZTECAS, string);
                format(string, 128, " 6 - Guerrilheiros Israelitas: %s", InfoOrg[6][Lider]);
                SendClientMessage(playerid, COR_GI, string);
                format(string, 128, " 7 - Prefeito LS: %s", InfoOrg[7][Lider]);
                SendClientMessage(playerid, COR_PRE, string);
                format(string, 128, " 8 - Hitmans: %s", InfoOrg[8][Lider]);
                SendClientMessage(playerid, COR_HITMAN, string);
                format(string, 128, " 9 - Los Santos News: %s", InfoOrg[9][Lider]);
                SendClientMessage(playerid, COR_REP, string);
                format(string, 128, " 10 - Taxista: %s", InfoOrg[10][Lider]);
                SendClientMessage(playerid, COR_TAXI, string);
                format(string, 128, " 11 - Policia Federal: %s", InfoOrg[11][Lider]);
                SendClientMessage(playerid, COR_PF, string);
                format(string, 128, " 12 - Mбfia Cosa Nostra: %s", InfoOrg[12][Lider]);
                SendClientMessage(playerid, COR_COSA, string);
                format(string, 128, " 13 - Mбfia Yakuza: %s", InfoOrg[13][Lider]);
                SendClientMessage(playerid, COR_YAK, string);
                format(string, 128, " 14 - Groove LS: %s", InfoOrg[14][Lider]);
                SendClientMessage(playerid, COR_GRO, string);
                format(string, 128, " 15 - F.A.R.C: %s", InfoOrg[15][Lider]);
                SendClientMessage(playerid, COR_FARC, string);
                format(string, 128, " 16 - Policia Civil: %s", InfoOrg[16][Lider]);
                SendClientMessage(playerid, COR_PC, string);
                format(string, 128, " 17 - Ballas LS: %s", InfoOrg[17][Lider]);
                SendClientMessage(playerid, COR_BALLAS, string);
                format(string, 128, " 18 - Vagos LS: %s", InfoOrg[18][Lider]);
                SendClientMessage(playerid, COR_VAGOS, string);
                format(string, 128, " 19 - Comando Vermelho LS: %s", InfoOrg[19][Lider]);
                SendClientMessage(playerid, 0xF6000000, string);
                format(string, 128, " 20 - Sons of Anarchy: %s", InfoOrg[20][Lider]);
                SendClientMessage(playerid, COR_SONS, string);
                format(string, 128, " 21 - Drifters: %s", InfoOrg[21][Lider]);
                SendClientMessage(playerid, COR_DRIFT, string);
                format(string, 128, " 22 - Triads: %s", InfoOrg[22][Lider]);
                SendClientMessage(playerid, COR_TRIADS, string);
                format(string, 128, " 23 - PCC LS: %s", InfoOrg[23][Lider]);
                SendClientMessage(playerid, COR_PCC, string);
                format(string, 128, " 24 - Groove SF: %s", InfoOrg[24][Lider]);
                SendClientMessage(playerid, COR_GRO, string);
                format(string, 128, " 25 - Vagos SF: %s", InfoOrg[25][Lider]);
                SendClientMessage(playerid, COR_VAGOS, string);
                format(string, 128, " 26 - PCC SF: %s", InfoOrg[26][Lider]);
                SendClientMessage(playerid, COR_PCC, string);
                format(string, 128, " 27 - Mйdicos SF: %s", InfoOrg[27][Lider]);
                SendClientMessage(playerid, COR_MEDE, string);
                format(string, 128, " 28 - Comando Vermelho SF: %s", InfoOrg[28][Lider]);
                SendClientMessage(playerid, 0xF6000000, string);
                format(string, 128, " 29 - Ballas SF: %s", InfoOrg[29][Lider]);
                SendClientMessage(playerid, COR_BALLAS, string);
                format(string, 128, " 30 - Prefeito SF: %s", InfoOrg[30][Lider]);
                SendClientMessage(playerid, COR_PRE, string);
                format(string, 128, " 31 - Aztecas SF: %s", InfoOrg[31][Lider]);
                SendClientMessage(playerid, COR_AZTECAS, string);
                format(string, 128, " 32 - San Fierro News: %s", InfoOrg[32][Lider]);
                SendClientMessage(playerid, COR_REP, string);
                format(string, 128, " 33 - Taxista SF: %s", InfoOrg[33][Lider]);
                SendClientMessage(playerid, COR_TAXI, string);
                format(string, 128, " 34 - Policia Militar SF: %s", InfoOrg[34][Lider]);
                SendClientMessage(playerid, COR_PM, string);
                format(string, 128, " 35 - Rotam SF: %s", InfoOrg[35][Lider]);
                SendClientMessage(playerid, COR_ROTAM, string);
            }
        return true;
    }
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=270889
https://sampforum.blast.hk/showthread.php?tid=288305


isso ae acima explicara como voзe criar carros especificos para as equipes e etc agora o negocio da cor ae e simples so basta procurar se voзe quer mesmo aprender leia os tutoriais acima.
Reply
#3

Quote:
Originally Posted by Q.I
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=270889
https://sampforum.blast.hk/showthread.php?tid=288305


isso ae acima explicara como voзe criar carros especificos para as equipes e etc agora o negocio da cor ae e simples so basta procurar se voзe quer mesmo aprender leia os tutoriais acima.
Vocк nгo entendeu mano eu precisava do comando /orgs no qual mostre todas as minhas 35 orgs para poder colocar no server em dialog pq ele sу estб em list que aparece no chat como SendClientMessage...
Reply
#4

Cara tira o SendClientMessage coloque strcat
e no final ShowPlayerDialog

Код:
if(strcmp(cmd, "/orgs", true) == 0)//comando
    {
        if(IsPlayerConnected(playerid))
        {
        new string2[512]//se nгo aparecer todas as orgs aumente a string2
        format(string, sizeof(string),"ORG1: %s\nORG2: %s\nORG3:%s",InfoOrg[1][Lider],InfoOrg[2][Lider], InfoOrg[3][Lider]);
        strcat(string2,string);
        format(string, sizeof(string2),"\nORG4: %s\nORG5: %s\nORG6: %s\nORG7: %s\nORG8: %s\nORG9: %s\nORG10: %s\nORG11: %s\nORG12: %s",InfoOrg[4][Lider],InfoOrg[5][Lider],InfoOrg[6][Lider],InfoOrg[7][Lider],InfoOrg[8][Lider],InfoOrg[9][Lider],InfoOrg[10][Lider],InfoOrg[11][Lider],InfoOrg[12][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG13: %s\nORG14: %s\nORG15: %s\nORG16: %s",InfoOrg[13][Lider],InfoOrg[14][Lider],InfoOrg[15][Lider],InfoOrg[16][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG17: %s\nORG18: %s\nORG19: %s\nORG20: %s",InfoOrg[17][Lider],InfoOrg[18][Lider],InfoOrg[19][Lider],InfoOrg[20][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG21: %s\nORG22: %s\nORG23: %s\nORG24: %s",InfoOrg[21][Lider],InfoOrg[22][Lider],InfoOrg[23][Lider],InfoOrg[24][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG25: %s\nORG26: %s\nORG27: %s\nORG28: %s",InfoOrg[25][Lider],InfoOrg[26][Lider],InfoOrg[27][Lider],InfoOrg[28][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG29: %s\nORG30: %s\nORG31: %s\nORG32: %s",InfoOrg[29][Lider],InfoOrg[30][Lider],InfoOrg[31][Lider],InfoOrg[32][Lider]);//infoorg[id][lider]//lider da org talz %s vai mostrar qual й o lider
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG33: %s\nORG34: %s\nORG35: %s",InfoOrg[33][Lider],InfoOrg[34][Lider],InfoOrg[35][Lider]));
      strcat(string2,string);
      ShowPlayerDialog(playerid, 6666, DIALOG_STYLE_MSGBOX,"Organizaзхes",string2, "Ok","");//vai abrir em dialog estilo de caixa de mensagem 
   
        }
        return true;
    }
Nгo sei as definiзхes do seu game mode nгo da pra fazer muito, troda o ORG1 pelo nome da ORG que desejar assim por diante
e der erro caso apenas copie os codigos devera dar um erro Loose indentation alinhe o cod com o new string2
Reply
#5

Quote:
Originally Posted by StrondaXxT
Посмотреть сообщение
Cara tira o SendClientMessage coloque strcat
e no final ShowPlayerDialog

Код:
if(strcmp(cmd, "/orgs", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
        new string2[512]//se nгo aparecer todas as orgs aumente a string2
        format(string, sizeof(string),"ORG1: %s\nORG2: %s\nORG3:%s",InfoOrg[1][Lider],InfoOrg[2][Lider], InfoOrg[3][Lider]);
        strcat(string2,string);
        format(string, sizeof(string2),"\nORG4: %s\nORG5: %s\nORG6: %s\nORG7: %s\nORG8: %s\nORG9: %s\nORG10: %s\nORG11: %s\nORG12: %s",InfoOrg[4][Lider],InfoOrg[5][Lider],InfoOrg[6][Lider],InfoOrg[7][Lider],InfoOrg[8][Lider],InfoOrg[9][Lider],InfoOrg[10][Lider],InfoOrg[11][Lider],InfoOrg[12][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG13: %s\nORG14: %s\nORG15: %s\nORG16: %s",InfoOrg[13][Lider],InfoOrg[14][Lider],InfoOrg[15][Lider],InfoOrg[16][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG17: %s\nORG18: %s\nORG19: %s\nORG20: %s",InfoOrg[17][Lider],InfoOrg[18][Lider],InfoOrg[19][Lider],InfoOrg[20][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG21: %s\nORG22: %s\nORG23: %s\nORG24: %s",InfoOrg[21][Lider],InfoOrg[22][Lider],InfoOrg[23][Lider],InfoOrg[24][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG25: %s\nORG26: %s\nORG27: %s\nORG28: %s",InfoOrg[25][Lider],InfoOrg[26][Lider],InfoOrg[27][Lider],InfoOrg[28][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG29: %s\nORG30: %s\nORG31: %s\nORG32: %s",InfoOrg[29][Lider],InfoOrg[30][Lider],InfoOrg[31][Lider],InfoOrg[32][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG33: %s\nORG34: %s\nORG35: %s",InfoOrg[33][Lider],InfoOrg[34][Lider],InfoOrg[35][Lider]));
      strcat(string2,string);
      ShowPlayerDialog(playerid, 6666, DIALOG_STYLE_MSGBOX,"Organizaзхes",string2, "Ok","");
   
        }
        return true;
    }
Mano muito obrigado muito obrigado mesmo mas sem querer ser chato.... Poderia explicar as funзхes?
Reply
#6

tentei explicar mais ou menos testa ai..
Reply
#7

Quote:
Originally Posted by StrondaXxT
Посмотреть сообщение
Cara tira o SendClientMessage coloque strcat
e no final ShowPlayerDialog

Код:
if(strcmp(cmd, "/orgs", true) == 0)//comando
    {
        if(IsPlayerConnected(playerid))
        {
        new string2[512]//se nгo aparecer todas as orgs aumente a string2
        format(string, sizeof(string),"ORG1: %s\nORG2: %s\nORG3:%s",InfoOrg[1][Lider],InfoOrg[2][Lider], InfoOrg[3][Lider]);
        strcat(string2,string);
        format(string, sizeof(string2),"\nORG4: %s\nORG5: %s\nORG6: %s\nORG7: %s\nORG8: %s\nORG9: %s\nORG10: %s\nORG11: %s\nORG12: %s",InfoOrg[4][Lider],InfoOrg[5][Lider],InfoOrg[6][Lider],InfoOrg[7][Lider],InfoOrg[8][Lider],InfoOrg[9][Lider],InfoOrg[10][Lider],InfoOrg[11][Lider],InfoOrg[12][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG13: %s\nORG14: %s\nORG15: %s\nORG16: %s",InfoOrg[13][Lider],InfoOrg[14][Lider],InfoOrg[15][Lider],InfoOrg[16][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG17: %s\nORG18: %s\nORG19: %s\nORG20: %s",InfoOrg[17][Lider],InfoOrg[18][Lider],InfoOrg[19][Lider],InfoOrg[20][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG21: %s\nORG22: %s\nORG23: %s\nORG24: %s",InfoOrg[21][Lider],InfoOrg[22][Lider],InfoOrg[23][Lider],InfoOrg[24][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG25: %s\nORG26: %s\nORG27: %s\nORG28: %s",InfoOrg[25][Lider],InfoOrg[26][Lider],InfoOrg[27][Lider],InfoOrg[28][Lider]);
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG29: %s\nORG30: %s\nORG31: %s\nORG32: %s",InfoOrg[29][Lider],InfoOrg[30][Lider],InfoOrg[31][Lider],InfoOrg[32][Lider]);//infoorg[id][lider]//lider da org talz %s vai mostrar qual й o lider
      strcat(string2,string);
      format(string, sizeof(string2),"\nORG33: %s\nORG34: %s\nORG35: %s",InfoOrg[33][Lider],InfoOrg[34][Lider],InfoOrg[35][Lider]));
      strcat(string2,string);
      ShowPlayerDialog(playerid, 6666, DIALOG_STYLE_MSGBOX,"Organizaзхes",string2, "Ok","");//vai abrir em dialog estilo de caixa de mensagem 
   
        }
        return true;
    }
Nгo sei as definiзхes do seu game mode nгo da pra fazer muito, troda o ORG1 pelo nome da ORG que desejar assim por diante
e der erro caso apenas copie os codigos devera dar um erro Loose indentation alinhe o cod com o new string2

Cara deu esses erros
pawn Код:
C:\Documents and Settings\Administrador\Desktop\BUC-GameMode Foda\gamemodes\BUC.pwn(25520) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\Administrador\Desktop\BUC-GameMode Foda\gamemodes\BUC.pwn(25534) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Administrador\Desktop\BUC-GameMode Foda\gamemodes\BUC.pwn(25534) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador\Desktop\BUC-GameMode Foda\gamemodes\BUC.pwn(25534) : warning 215: expression has no effect
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
pawn Код:
Linhas 25520        format(string, sizeof(string2),"\nORG33: %s\nORG34: %s\nORG35: %s",InfoOrg[33][Lider],InfoOrg[34][Lider],InfoOrg[35][Lider]));
pawn Код:
Linha 25534         format(string, sizeof(string2),"\nORG33: %s\nORG34: %s\nORG35: %s",InfoOrg[33][Lider],InfoOrg[34][Lider],InfoOrg[35][Lider]));
pawn Код:
Linha 25534         format(string, sizeof(string2),"\nORG33: %s\nORG34: %s\nORG35: %s",InfoOrg[33][Lider],InfoOrg[34][Lider],InfoOrg[35][Lider]));
pawn Код:
Linha 25534         format(string, sizeof(string2),"\nORG33: %s\nORG34: %s\nORG35: %s",InfoOrg[33][Lider],InfoOrg[34][Lider],InfoOrg[35][Lider]));

Poderia ajudar?


@edit CONSEGUI RESOLVER OS PROBLEMAS A ЪLTIMA LINHA
pawn Код:
format(string, sizeof(string2),"\nORG33: %s\nORG34: %s\nORG35: %s",InfoOrg[33][Lider],InfoOrg[34][Lider],InfoOrg[35][Lider]));
Nгo poderia ter aqueles )); somente ); obrigado pela mega boa vontade irei estudar o cуdigo para nгo fazer perguntas idiotas aqui novamente.
Reply
#8

tem um ) a mais tira ele

Esse й o espirito da coisa estudar sempre vai te levar mais longe!! mais se tiver duvidas й bom perguntar.
Reply
#9

Quote:
Originally Posted by StrondaXxT
Посмотреть сообщение
tem um ) a mais tira ele

Esse й o espirito da coisa estudar sempre vai te levar mais longe!! mais se tiver duvidas й bom perguntar.
cara ъltima coisinha.... No meu caso ali para por cores no Dialog usaria hexadecimais ou defines de cores?
@EDIT PROBLEMINHA AQUI....

pawn Код:
if(strcmp(cmd, "/orgs", true) == 0)
     {

        if(IsPlayerConnected(playerid))
        {

        new string2[512]//se nгo aparecer todas as orgs aumente a string2
        format(string, sizeof(string),"1-Policia Militar LS: %s\n 2-Rotam LS: %s\n 3-Forзas Armadas:%s",InfoOrg[1][Lider],InfoOrg[2][Lider], InfoOrg[3][Lider]);
        strcat(string2,string);
        format(string, sizeof(string2),"\n 4-Mйdicos LS: %s\n 5 - Aztecas LS: %s\n 6 - Guerrilheiros Israelitas: %s\n 7 - Prefeito LS: %s\n  8 - Hitmans: %s\n 9 - Los Santos News: %s\n 10 - Taxista: %s\n 11 - Policia Federal: %s\n 12 - Mбfia Cosa Nostra: %s",InfoOrg[4][Lider],InfoOrg[5][Lider],InfoOrg[6][Lider],InfoOrg[7][Lider],InfoOrg[8][Lider],InfoOrg[9][Lider],InfoOrg[10][Lider],InfoOrg[11][Lider],InfoOrg[12][Lider]);
        strcat(string2,string);
        format(string, sizeof(string2),"\n 13 - Mбfia Yakuza: %s\n 14 - Groove LS: %s\n 15 - F.A.R.C: %s\n16 - Policia Civil: %s",InfoOrg[13][Lider],InfoOrg[14][Lider],InfoOrg[15][Lider],InfoOrg[16][Lider]);
        strcat(string2,string);
        format(string, sizeof(string2),"\n 17 - Ballas LS: %s\n 18 - Vagos LS: %s\n 19 - Comando Vermelho LS: %s\n 20 - Sons of Anarchy: %s",InfoOrg[17][Lider],InfoOrg[18][Lider],InfoOrg[19][Lider],InfoOrg[20][Lider]);
        strcat(string2,string);
        format(string, sizeof(string2),"\n 21 - Drifters: %s\n22 - Triads 2: %s\n23 - PCC LS: %s\n 24 - Groove SF: %s",InfoOrg[21][Lider],InfoOrg[22][Lider],InfoOrg[23][Lider],InfoOrg[24][Lider]);
        strcat(string2,string);
        format(string, sizeof(string2),"\n 25 - Vagos SF: %s\n 26 - PCC SF: %s\n 27 - Mйdicos SF: %s\n 28 - Comando Vermelho SF: %s",InfoOrg[25][Lider],InfoOrg[26][Lider],InfoOrg[27][Lider],InfoOrg[28][Lider]);
        strcat(string2,string);
        format(string, sizeof(string2),"\n 29 - Ballas SF: %s\n 30 - Prefeito SF: %s\n 31 - Aztecas SF: %s\n 32 - San Fierro News: %s",InfoOrg[29][Lider],InfoOrg[30][Lider],InfoOrg[31][Lider],InfoOrg[32][Lider]);
        strcat(string2,string);
        format(string, sizeof(string2),"\n 33 - Taxista SF: %s\n 34 - Policia Militar SF: %s\n 35 - Rotam SF: %s",InfoOrg[33][Lider],InfoOrg[34][Lider],InfoOrg[35][Lider]);
        strcat(string2,string);
        ShowPlayerDialog(playerid, 6666, DIALOG_STYLE_MSGBOX,"[BUC]Organizaзхes[RPG]",string2, "Ok","");

    }
        return true;
}
Coloquei o nome das orgs mas agora sу estб aparecendo atй a 19 :S
Reply
#10

Usa-se cores HEX
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)