#define COLOR_PM 0x9999FFF6
#define COLOR_BOPE 0x666699F6
#define COLOR_EXE 0x00660CF6
#define COLOR_MEDICOS 0xCC6666F6
#define COLOR_AZTECAS 0x0000CCF6
#define COLOR_HAMAS 0x009999F6
#define COLOR_BOPEE 0x6699FFF6
#define COLOR_HITMAN 0xA9A9A9F6
#define COLOR_REP 0xFFC1C1F6
#define COLOR_TAXI 0x66FFFFF6
#define COLOR_PF 0x999966F6
#define COLOR_COSANOSTRA 0x996600F6
#define COLOR_Yakuza 0x660066F6
#define COLOR_GRO 0x33FF00F6
#define COLOR_AL 0xFFCC99F6
#define COLOR_PC 0x93833EF6
#define COLOR_BALLAS 0x9900CCF6
#define COLOR_VAGOS 0xFFFF33F6
#define COLOR_BLOODS 0xFF0000FF
#define COLOR_TUGAS 0xCCFF99FF
#define COLOR_ADMIN 0xFF34B3F6
#define COLOR_SONS 0xA00A0AF6
#define COLOR_MAYANS 0x9F6EFFF6
if(strcmp(cmd, "/orgs", true) == 0 || strcmp(cmd, "/organizacoes", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Fala[800];
new Fala2[800];
format(Fala,sizeof(Fala),"1 - Policia Militar: %s\n\n2 - BOPE: %s\n\n3 - Exйrcito: %s\n\n4 - Mйdicos: %s\n\n5 - Los Aztecas: %s\n\n6 - Hamas: %s\n\n7 - Prefeitura: %s\n\n8 - Hitmans: %s\n\n9 - Repуrteres: %s\n\n10 - Taxistas: %s\n\n11 - Policia Federal: %s\n\n",InfoOrg[1][Lider],InfoOrg[2][Lider],InfoOrg[3][Lider],InfoOrg[4][Lider],InfoOrg[5][Lider],InfoOrg[6][Lider],InfoOrg[7][Lider],InfoOrg[8][Lider],InfoOrg[9][Lider],InfoOrg[10][Lider],InfoOrg[11][Lider]);
format(Fala2,sizeof(Fala2),"%s12 - Cosa Nostra: %s\n\n13 - Yakuza: %s\n\n14 - Grove Street: %s\n\n15 - AlґQaeda: %s\n\n16 - Policia Civil: %s\n\n17 - Ballas: %s\n\n18 - Los Santos Vagos: %s\n\n19 - Bloods: %s\n\n20 - Los Tugas: %s\n\n21 - Sons Of Anarchy: %s\n\n22 - Mayans: %s",Fala,InfoOrg[12][Lider],InfoOrg[13][Lider],InfoOrg[14][Lider],InfoOrg[15][Lider],InfoOrg[16][Lider],InfoOrg[17][Lider],InfoOrg[18][Lider],InfoOrg[19][Lider],InfoOrg[20][Lider],InfoOrg[21][Lider],InfoOrg[22][Lider]);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Organizaзхes",Fala2,"Cancelar","");
return 1;
if ( strcmp, cmd, "/orgs", true ) == 0 ) {
static pStr[50];
format ( pStr, sizeof pStr, "1 - Policia Militar: %s", InfoOrg[1][Lider] );
SendClientMessage(playerid, -1, pStr );
format ( pStr, sizeof pStr, "2 - BOPE: %s", InfoOrg[2][Lider] );
SendClientMessage(playerid, -1, pStr );
// E assim por diante...
return true;
}
if(strcmp(cmd, "/orgs", true) == 0 || strcmp(cmd, "/organizacoes", true) == 0)
{
static
xCelulas [ 50 ]
;
format ( xCelulas, sizeof ( xCelulas ), "1 - Policia Militar: %s", InfoOrg [ 1 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_PM, xCelulas ) ;
format ( xCelulas, sizeof ( xCelulas ), "2 - BOPE: %s\n", InfoOrg [ 2 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_BOPE, xCelulas ) ;
format ( xCelulas, sizeof ( xCelulas ), "3 - Exйrcito: %s", InfoOrg [ 3 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_EXE, xCelulas ) ;
format ( xCelulas, sizeof ( xCelulas ), "4 - Mйdicos: %s", InfoOrg [ 4 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_MEDICOS, xCelulas ) ;
format ( xCelulas, sizeof ( xCelulas ), "5 - Los Aztecas: %s", InfoOrg [ 5 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_AZTECAS, xCelulas ) ;
format ( xCelulas, sizeof ( xCelulas ), "6 - Hamas: %s", InfoOrg [ 6 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_HAMAS, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "7 - Prefeitura: %s", InfoOrg [ 7 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_BOPEE, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "8 - Hitmans: %s", InfoOrg [ 8 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_HITMAN, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), " 9 - Reporter: %s", InfoOrg [ 9 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_REP, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "10 - Taxista: %s", InfoOrg [ 10 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_TAXI, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "11 - Polнcia Federal: %s", InfoOrg [ 11 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_PF, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "12 - Cosa Nostra: %s", InfoOrg [ 12 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_COSANOSTRA, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "13 - Yakuza: %s", InfoOrg [ 13 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_Yakuza, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "14 - Groove Street: %s", InfoOrg [ 14 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_GRO, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "15 - Al'qaeda: %s", InfoOrg [ 15 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_AL, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "16 - Polнcia Civil: %s", InfoOrg [ 16 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_PC, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "17 - Balas: %s", InfoOrg [ 17 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_BALLAS, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "18 - Los Santos Vagos: %s", InfoOrg [ 18 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_VAGOS, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "19 - Bloods: %s", InfoOrg [ 19 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_BLOODS, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "20 - Los Tugas: %s", InfoOrg [ 20 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_TUGAS, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "21 - Sons of Anarchy: %s", InfoOrg [ 21 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_SONS, string);
format ( xCelulas, sizeof ( xCelulas ), "22 - Mayans: %s", InfoOrg [ 22 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_MAYANS, xCelulas ) ;
return true;
}
Ve se ta certo ae fera.
PHP код:
|
SendClientMessage(playerid, -1, string);
Nгo tem necessidade de checar se o jogador que executou o comando estб online. Este й um grande problema dos GFs, chamadas desnecessбrias.
Sem falar no: pawn Код:
|
if(strcmp(cmd, "/orgs", true) == 0 || strcmp(cmd, "/organizacoes", true) == 0)
{
static
xCelulas [ 50 ]
;
format ( xCelulas, sizeof ( xCelulas ), "1 - Policia Militar: %s", InfoOrg [ 1 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_PM, xCelulas ) ;
format ( xCelulas, sizeof ( xCelulas ), "2 - BOPE: %s\n", InfoOrg [ 2 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_BOPE, xCelulas ) ;
format ( xCelulas, sizeof ( xCelulas ), "3 - Exйrcito: %s", InfoOrg [ 3 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_EXE, xCelulas ) ;
format ( xCelulas, sizeof ( xCelulas ), "4 - Mйdicos: %s", InfoOrg [ 4 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_MEDICOS, xCelulas ) ;
format ( xCelulas, sizeof ( xCelulas ), "5 - Los Aztecas: %s", InfoOrg [ 5 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_AZTECAS, xCelulas ) ;
format ( xCelulas, sizeof ( xCelulas ), "6 - Hamas: %s", InfoOrg [ 6 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_HAMAS, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "7 - Prefeitura: %s", InfoOrg [ 7 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_BOPEE, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "8 - Hitmans: %s", InfoOrg [ 8 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_HITMAN, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), " 9 - Reporter: %s", InfoOrg [ 9 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_REP, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "10 - Taxista: %s", InfoOrg [ 10 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_TAXI, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "11 - Polнcia Federal: %s", InfoOrg [ 11 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_PF, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "12 - Cosa Nostra: %s", InfoOrg [ 12 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_COSANOSTRA, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "13 - Yakuza: %s", InfoOrg [ 13 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_Yakuza, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "14 - Groove Street: %s", InfoOrg [ 14 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_GRO, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "15 - Al'qaeda: %s", InfoOrg [ 15 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_AL, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "16 - Polнcia Civil: %s", InfoOrg [ 16 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_PC, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "17 - Balas: %s", InfoOrg [ 17 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_BALLAS, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "18 - Los Santos Vagos: %s", InfoOrg [ 18 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_VAGOS, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "19 - Bloods: %s", InfoOrg [ 19 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_BLOODS, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "20 - Los Tugas: %s", InfoOrg [ 20 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_TUGAS, xCelulas );
format ( xCelulas, sizeof ( xCelulas ), "21 - Sons of Anarchy: %s", InfoOrg [ 21 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_SONS, xCelulas ) ;
format ( xCelulas, sizeof ( xCelulas ), "22 - Mayans: %s", InfoOrg [ 22 ] [ Lider ] ) ;
SendClientMessage ( playerid, COLOR_MAYANS, xCelulas ) ;
return true;
}