SA-MP Forums Archive
[AJUDA] Gangs - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Gangs (/showthread.php?tid=346460)



[AJUDA] Gangs - .FuneraL. - 28.05.2012

Pessoal , estou a criar uma pequena coisa aqui no meu sistema de gangs , criei para aparecer o nome da gang do player quando ele dominar uma checkpoint , mas em todas aparece bozos. que seria a primeira gang , o que hб de errado no code? :

pawn Код:
new NomeGang[MAX_PLAYERS] =
{
"Bozos",
"Vagos",
"Ballas",
"Mendigos",
"Aztecas",
"Ricos",
"Putinhas",
"Noias",
"Drifters",
"Agentes",
"Frangos",
"Padres",
"Padres",
"Pedreiros",
"Militares",
"Atiradores",
"Grooves",
"Executivos",
"Esportistas",
"Taxistas",
"Carecas",
"Coveiros",
"Girls",
"Medicos",
"Chineses",
"Fadinhas",
"Wak"
};

E Na Public das Checkpoints :

format(string, 566,"{9400D3}[GANGZONE]: {B5B5B5}%s {9400D3}[ID: %d]{B5B5B5} Acabou de Dominar um Territorio Para a Gang : %s!", pname, i, NomeGang[i]);
SendClientMessageToAll(0xFFFF00AA, string);
Dou + Rep


Re: [AJUDA] Gangs - ViniBorn - 28.05.2012

Isso nao й inteiro, portanto nгo pode ser tratado como tal.

pawn Код:
new NomeGang[MAX_PLAYERS] =
pawn Код:
new NomeGang[N_GANGS][] =



Re: [AJUDA] Gangs - .FuneraL. - 28.05.2012

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Isso nao й inteiro, portanto nгo pode ser tratado como tal.

pawn Код:
new NomeGang[MAX_PLAYERS] =
pawn Код:
new NomeGang[N_GANGS][] =
Se eu Troca-lo entгo por N_GANGS, Nгo vou precisar criar nenhuma new? e como deixaria dentro da Public Onde tem NomeGang[i] ?


Re: [AJUDA] Gangs - ViniBorn - 28.05.2012

Eu contei 27 , entгo seria assim :

pawn Код:
static const NomeGang[27][] =

format(string, 566,"{9400D3}[GANGZONE]: {B5B5B5}%s {9400D3}[ID: %d]{B5B5B5} Acabou de Dominar um Territorio Para a Gang : %s!", pname, i, NomeGang[GetGang(i)]);
Onde GetGang(i) seria uma funзгo que retorna o ID da gang do jogador.


Re: [AJUDA] Gangs - CidadeNovaRP - 28.05.2012

Tenta:
pawn Код:
new NomeGang[28][] = {
{"Bozos"},
{"Vagos"},
{"Ballas"},
{"Mendigos"},
{"Aztecas"},
{"Ricos"},
{"Putinhas"},
{"Noias"},
{"Drifters"},
{"Agentes"},
{"Frangos"},
{"Padres"},
{"Padres"},
{"Pedreiros"},
{"Militares"},
{"Atiradores"},
{"Grooves"},
{"Executivos"},
{"Esportistas"},
{"Taxistas"},
{"Carecas"},
{"Coveiros"},
{"Girls"},
{"Medicos"},
{"Chineses"},
{"Fadinhas"},
{"Wak"
};



Re: [AJUDA] Gangs - .FuneraL. - 28.05.2012

Retirando uma destas chaves do Inicio "Compila" mas da erro no Pawn, e com todas as chaves, da erro.


Re: [AJUDA] Gangs - ViniBorn - 28.05.2012

pawn Код:
static const NomeGang[27][] = {
{"Bozos"},
{"Vagos"},
{"Ballas"},
{"Mendigos"},
{"Aztecas"},
{"Ricos"},
{"Putinhas"},
{"Noias"},
{"Drifters"},
{"Agentes"},
{"Frangos"},
{"Padres"},
{"Padres"},
{"Pedreiros"},
{"Militares"},
{"Atiradores"},
{"Grooves"},
{"Executivos"},
{"Esportistas"},
{"Taxistas"},
{"Carecas"},
{"Coveiros"},
{"Girls"},
{"Medicos"},
{"Chineses"},
{"Fadinhas"},
{"Wak"}
};
pawn Код:
format(string, 566,"{9400D3}[GANGZONE]: {B5B5B5}%s {9400D3}[ID: %d]{B5B5B5} Acabou de Dominar um Territorio Para a Gang : %s!", pname, i, NomeGang[GetGang(i)]);



Re: [AJUDA] Gangs - .FuneraL. - 28.05.2012

pawn Код:
C:\Users\Lucas\Desktop\[BR] Linha de Guerra - A Ultima Rebeliao - GameMode\gamemodes\GMLinha.pwn(3743) : error 017: undefined symbol "GetGang"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.



Re: [AJUDA] Gangs - paulor - 28.05.2012

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
pawn Код:
C:\Users\Lucas\Desktop\[BR] Linha de Guerra - A Ultima Rebeliao - GameMode\gamemodes\GMLinha.pwn(3743) : error 017: undefined symbol "GetGang"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Onde GetGang(i) seria uma funзгo que retorna o ID da gang do jogador.
....


Re: [AJUDA] Gangs - ViniBorn - 28.05.2012

Ou vocк cria essa funзгo, ou usa a prуpria variбvel de gang...