[Ajuda] ChatBubble Cargos
#1

PHP код:
//-----------------------------------FAVELA-------------------------------------//
    
if(Player[playerid][pRadinho] == 1)
     {
     new 
Player[playerid][pFaccao];
     
format(string,256,"Radinho - %s",Faccoes[t][tNome]);
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
    if(
Player[playerid][pFogueteiro] == 1)
     {
     new 
Player[playerid][pFaccao];
      
format(string,256,"Fogueteiro - %s",Faccoes[t][tNome]);
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
    if(
Player[playerid][pVapor] == 1)
     {
     new 
Player[playerid][pFaccao];
      
format(string,256,"Vapor - %s",Faccoes[t][tNome]);
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
    if(
Player[playerid][pGerente] == 1)
     {
     new 
Player[playerid][pFaccao];
      
format(string,256,"Gerente - %s",Faccoes[t][tNome]);
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
    if(
Player[playerid][pFrente] == 1)
     {
     new 
Player[playerid][pFaccao];
      
format(string,256,"Frente - %s",Faccoes[t][tNome]);
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
      if(
Player[playerid][pDM] == 1)
     {
     new 
Player[playerid][pFaccao];
      
format(string,256,"Dono Morro - %s",Faccoes[t][tNome]);
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
      if(
Player[playerid][pLider] == 1)
     {
    if(
Player[playerid][pFaccao] == || Player[playerid][pFaccao] == || Player[playerid][pFaccao] == || Player[playerid][pFaccao] == 4)
    {
      
format(string,256,"Lнder Facзгo - CMD");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
       }
    if(
Player[playerid][pFaccao] == || Player[playerid][pFaccao] == || Player[playerid][pFaccao] == || Player[playerid][pFaccao] == 8)
    {
      
format(string,256,"Lнder Facзгo - LLL");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
       }
    if(
Player[playerid][pFaccao] == || Player[playerid][pFaccao] == 10 || Player[playerid][pFaccao] == 11 || Player[playerid][pFaccao] == 12)
    {
      
format(string,256,"Lнder Facзгo - TD3");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
       }
    if(
Player[playerid][pFaccao] == 13 || Player[playerid][pFaccao] == 14 || Player[playerid][pFaccao] == 15 || Player[playerid][pFaccao] == 16)
    {
      
format(string,256,"Lнder Facзгo - MLC");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
       }
       }
//------------------------------------------------------------------------------//
      
if(Player[playerid][pPMRJ] == 1)
     {
      
format(string,256,"Policial Militar - Recruta");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
      if(
Player[playerid][pPMRJ] == 2)
     {
      
format(string,256,"Policial Militar - Soldado");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
      if(
Player[playerid][pPMRJ] == 3)
     {
      
format(string,256,"Policial Militar - Capitгo");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
      if(
Player[playerid][pPMRJ] == 4)
     {
      
format(string,256,"Policial Militar - Major");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
      if(
Player[playerid][pPMRJ] == 5)
     {
      
format(string,256,"Policial Militar - Coronel");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
      if(
Player[playerid][pPCRJ] == 1)
     {
      
format(string,256,"Policial Civil - Piloto");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
      if(
Player[playerid][pPCRJ] == 2)
     {
      
format(string,256,"Policial Civil - Inspetor");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
      if(
Player[playerid][pPCRJ] == 3)
     {
      
format(string,256,"Policial Civil - Investigador");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
      if(
Player[playerid][pPCRJ] == 4)
     {
      
format(string,256,"Policial Civil - Comissбrio");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
      if(
Player[playerid][pPCRJ] == 5)
     {
      
format(string,256,"Policial Civil - Delegado");
       
SetPlayerChatBubble(playerid,stringCOR_PRINCIPAL20.010000);
      }
//-----------------------------------STAFF--------------------------------------//
    
if(Player[playerid][pAdmin] == 1)
     {
      
SetPlayerChatBubble(playerid,"Administrador Temporбrio",COR_PRINCIPAL,20.0,10000);
      }
      if(
Player[playerid][pAdmin] == 2)
     {
      
SetPlayerChatBubble(playerid,"Admininistrador Ajudante",COR_PRINCIPAL,20.0,10000);
      }
      if(
Player[playerid][pAdmin] == 3)
     {
      
SetPlayerChatBubble(playerid,"Administrador Fixo",COR_PRINCIPAL,20.0,10000);
      }
      if(
Player[playerid][pAdmin] == 4)
     {
      
SetPlayerChatBubble(playerid,"Sub Game Master",COR_PRINCIPAL,20.0,10000);
    }
      if(
Player[playerid][pAdmin] == 5)
     {
      
SetPlayerChatBubble(playerid,"Game Master",COR_PRINCIPAL,20.0,10000);
      }
      if(
Player[playerid][pAdmin] == 6)
     {
      
SetPlayerChatBubble(playerid,"Lнder Geral",COR_PRINCIPAL,20.0,10000);
      } 
Sistema
Quote:

C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27311) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27314) : error 021: symbol already defined: "format"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27317) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27319) : error 021: symbol already defined: "t"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27320) : error 021: symbol already defined: "format"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27323) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27325) : error 021: symbol already defined: "t"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27326) : error 021: symbol already defined: "format"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27329) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27331) : error 021: symbol already defined: "t"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27332) : error 021: symbol already defined: "format"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27335) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27337) : error 021: symbol already defined: "t"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(2733 : error 021: symbol already defined: "format"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27341) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27343) : error 021: symbol already defined: "t"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27344) : error 021: symbol already defined: "format"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27347) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27349) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27354) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27359) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27364) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27371) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27376) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27381) : error 010: invalid function or declaration
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27386) : error 010: invalid function or declaration

Erros ao compilar alguem pode ajudar?
Reply
#2

Код:
	new t = Player[playerid][pFaccao], string[35];

	if(Player[playerid][pRadinho] == 1)
		format(string, sizeof(string), "Radinho - %s", Faccoes[t][tNome]);

	else if(Player[playerid][pFogueteiro] == 1)
		format(string, sizeof(string), "Fogueteiro - %s", Faccoes[t][tNome]);

	else if(Player[playerid][pVapor] == 1)
		format(string, sizeof(string), "Vapor - %s", Faccoes[t][tNome]);

	else if(Player[playerid][pGerente] == 1)
		format(string, sizeof(string), "Gerente - %s", Faccoes[t][tNome]);

	else if(Player[playerid][pFrente] == 1)
		format(string, sizeof(string), "Frente - %s", Faccoes[t][tNome]);

	else if(Player[playerid][pDM] == 1)
		format(string, sizeof(string), "Dono Morro - %s", Faccoes[t][tNome]);

	else if(Player[playerid][pLider] == 1)
	{
		if(t < 5)
			format(string, sizeof(string), "Lнder Facзгo - CMD");

		if(t < 9 && t > 4)
			format(string, sizeof(string), "Lнder Facзгo - LLL");

		if(t < 13 && t > 8)
			format(string, sizeof(string), "Lнder Facзгo - TD3");

		if(t < 17 && t > 13)
			format(string, sizeof(string), "Lнder Facзгo - MLC");
	}
	else if(Player[playerid][pPMRJ] == 1)
		format(string, sizeof(string), "Policial Militar - Recruta");

	else if(Player[playerid][pPMRJ] == 2)
		format(string, sizeof(string), "Policial Militar - Soldado");

	else if(Player[playerid][pPMRJ] == 3)
		format(string, sizeof(string), "Policial Militar - Capitгo");

	else if(Player[playerid][pPMRJ] == 4)
		format(string, sizeof(string), "Policial Militar - Major");

	else if(Player[playerid][pPMRJ] == 5)
		format(string, sizeof(string), "Policial Militar - Coronel");

	else if(Player[playerid][pPCRJ] == 1)
		format(string, sizeof(string), "Policial Civil - Piloto");

	else if(Player[playerid][pPCRJ] == 2)
		format(string, sizeof(string), "Policial Civil - Inspetor");

	else if(Player[playerid][pPCRJ] == 3)
		format(string, sizeof(string), "Policial Civil - Investigador");

	else if(Player[playerid][pPCRJ] == 4)
		format(string, sizeof(string), "Policial Civil - Comissбrio");

	else if(Player[playerid][pPCRJ] == 5)
		format(string, sizeof(string), "Policial Civil - Delegado");

	else if(Player[playerid][pAdmin] == 1)
		format(string, sizeof(string), "Administrador Temporбrio");

	else if(Player[playerid][pAdmin] == 2)
		format(string, sizeof(string), "Admininistrador Ajudante");

	else if(Player[playerid][pAdmin] == 3)
		format(string, sizeof(string), "Administrador Fixo");

	else if(Player[playerid][pAdmin] == 4)
		format(string, sizeof(string), "Sub Game Master");

	else if(Player[playerid][pAdmin] == 5)
		format(string, sizeof(string), "Game Master");

	else if(Player[playerid][pAdmin] == 6)
		format(string, sizeof(string), "Lнder Geral");

	SetPlayerChatBubble(playerid, string, COR_PRINCIPAL, 20.0, 10000);
Reply
#3

Adapta estб funзгo mas ъtil !

Exemplo:

Код:
SetTimer("TextoBubble",1000, true); 

forward TextPlayer();

public TextoBubble()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
       
if(Player[i][pRadinho] > = 1)
{
  SetPlayerChatBubble(i,"Radinho", -1, 20.0, 2000);
}
Agora Vai colocando todos os cargos em ordem certa, 2 Ex:

Код:
public TextoBubble()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
       
if(Player[i][pRadinho] > = 1)
{
  SetPlayerChatBubble(i,"Radinho", -1, 20.0, 2000);
}

if(Player[i][pFogueteiro] > = 1)
{
  SetPlayerChatBubble(i,"Fogueteiro", -1, 20.0, 2000);
}
E Assim vai...
Reply
#4

se vocк estiver pegando de uma gamemode so olhar a public q ta e cria um public igual ou casзa essa public
Reply
#5

Quote:

C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27352) : error 029: invalid expression, assumed zero
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27352) : warning 215: expression has no effect
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27352) : error 001: expected token: ";", but found ")"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27352) : error 029: invalid expression, assumed zero
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(27352) : fatal error 107: too many error messages on one line

erros ai cria e linha do sistema
Quote:

if(Player[i][pRadinho] > = 1)

Reply
#6

era so tirar o espaзo entre o > e o =
PHP код:
 if(Player[i][pRadinho] >= 1
Reply
#7

Quote:
Originally Posted by Dimbalada
Посмотреть сообщение
se vocк estiver pegando de uma gamemode so olhar a public q ta e cria um public igual ou casзa essa public
Diferentemente de vocк eu nгo preciso pegar partes de gamemodes pra implantar em outra!, seu colega tambйm estava com essa duvida entгo quer dizer que ele roubou de outra gamemode?

Код:
Veja o tуpico:
https://sampforum.blast.hk/showthread.php?tid=632350
Reply
#8

Quote:
Originally Posted by JhefTFJ
Посмотреть сообщение
Adapta estб funзгo mas ъtil !

Exemplo:

Код:
SetTimer("TextoBubble",1000, true); 

forward TextPlayer();

public TextoBubble()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
       
if(Player[i][pRadinho] > = 1)
{
  SetPlayerChatBubble(i,"Radinho", -1, 20.0, 2000);
}
Nгo tem necessidade de fazer loop, mt menos a cada segundo.
Reply
#9

Quote:

if(Player[playerid][pLider] == 1)
{
if(t < 5)
format(string, sizeof(string), "Lнder Facзгo - CMD");

if(t < 9 && t > 4)
format(string, sizeof(string), "Lнder Facзгo - LLL");

if(t < 13 && t >
format(string, sizeof(string), "Lнder Facзгo - TD3");

if(t < 17 && t > 13)
format(string, sizeof(string), "Lнder Facзгo - MLC");
}

i o lider? da erro em string o resto foi tudo suave
Reply
#10

Quote:
Originally Posted by Dimbalada
Посмотреть сообщение
i o lider? da erro em string o resto foi tudo suave
Poste o erro e a linha.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)