[Ajuda] Me ajuda a arrumar meu cod, n conheзo essas func
#1

Como nessa SS:


Queria fazer isso aн pra qnd um membro da policia civil desse /distintivo eu tentei assim:

Erros:
pawn Код:
playertextid = CreatePlayer3DTextLabel(playerid,"Policia Civil",COLOR_BLUE,X,Y,Z,40.0); // warning 204: symbol is assigned a value that is never used: "playertextid"
pawn Код:
Delete3DTextLabel(playertextid); // warning 213: tag mismatch
Codigo:
pawn Код:
if(strcmp(cmd, "/distintivo", true) == 0)
    {
        if(PlayerInfo[playerid][pLider] != 16 && PlayerInfo[playerid][pMembro] != 16) return SendClientMessage(playerid, COLOR_RED, "Vocк nгo й um Policial Civil.");
        if(distintivo[playerid] == 0) {
            distintivo[playerid] = 1;
            new PlayerText3D:playertextid;
            new Float:X, Float:Y, Float:Z;
            GetPlayerPos( playerid, X, Y, Z );
            playertextid = CreatePlayer3DTextLabel(playerid,"Policia Civil",COLOR_BLUE,X,Y,Z,40.0); // warning 204: symbol is assigned a value that is never used: "playertextid"
            format(string, sizeof(string), "O policial civil %s colocou seu distintivo a mostra.", PlayerName(playerid));
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            return 1;
        }
        if(distintivo[playerid] == 1) {
            distintivo[playerid] = 0;
           
            new PlayerText3D:playertextid;
            new Float:X, Float:Y, Float:Z;
            GetPlayerPos( playerid, X, Y, Z );
            playertextid = CreatePlayer3DTextLabel(playerid,"Policia Civil",COLOR_BLUE,X,Y,Z,40.0);
           
            Delete3DTextLabel(playertextid); // warning 213: tag mismatch
            format(string, sizeof(string), "O policial civil %s guardou seu distintivo.", PlayerName(playerid));
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            return 1;
        }
    }
Reply
#2

Topo do GM (Variavel Global):
pawn Код:
new PlayerText3D:playertextid;
Comandos:
pawn Код:
if(strcmp(cmd, "/distintivo", true) == 0)
    {
        if(PlayerInfo[playerid][pLider] != 16 && PlayerInfo[playerid][pMembro] != 16) return SendClientMessage(playerid, COLOR_RED, "Vocк nгo й um Policial Civil.");
        if(distintivo[playerid] == 0) {
            distintivo[playerid] = 1;
            new Float:X, Float:Y, Float:Z;
            GetPlayerPos( playerid, X, Y, Z );
            playertextid = CreatePlayer3DTextLabel(playerid,"Policia Civil",COLOR_BLUE,X,Y,Z,40.0); // warning 204: symbol is assigned a value that is never used: "playertextid"
            format(string, sizeof(string), "O policial civil %s colocou seu distintivo a mostra.", PlayerName(playerid));
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            return 1;
        }
        if(distintivo[playerid] == 1) {
            distintivo[playerid] = 0;
           
            new Float:X, Float:Y, Float:Z;
            GetPlayerPos( playerid, X, Y, Z );
            playertextid = CreatePlayer3DTextLabel(playerid,"Policia Civil",COLOR_BLUE,X,Y,Z,40.0);
           
            Delete3DTextLabel(playertextid); // warning 213: tag mismatch
            format(string, sizeof(string), "O policial civil %s guardou seu distintivo.", PlayerName(playerid));
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            return 1;
        }
    }
Reply
#3

pawn Код:
warning 213: tag mismatch
Em:
pawn Код:
Delete3DTextLabel(playertextid); // warning 213: tag mismatch
Reply
#4

Tente:
pawn Код:
if(strcmp(cmd, "/distintivo", true) == 0)
    {
        if(PlayerInfo[playerid][pLider] != 16 && PlayerInfo[playerid][pMembro] != 16)
            return SendClientMessage(playerid, COLOR_RED, "Vocк nгo й um Policial Civil.");

        if(distintivo[playerid] == 0) {
            distintivo[playerid] = 1;
            playertextid[playerid] = Create3DTextLabel("Policia Civil",COLOR_BLUE,0,0,0,40.0, 0);
            Attach3DTextLabelToPlayer(playertextid[playerid], playerid, 0.0, 0.0, 0.0);
            format(string, sizeof(string), "O policial civil %s colocou seu distintivo a mostra.", PlayerName(playerid));
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            return 1;
        }
       
        if(distintivo[playerid] == 1) {
            distintivo[playerid] = 0;
            Delete3DTextLabel(playertextid[playerid]); // warning 213: tag mismatch
            format(string, sizeof(string), "O policial civil %s guardou seu distintivo.", PlayerName(playerid));
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            return 1;
        }
Nгo esqueзa da variavel global:
pawn Код:
new Text3D:playertextid[MAX_PLAYERS];
Reply
#5

Quote:
Originally Posted by ForT
Посмотреть сообщение
Tente:
pawn Код:
if(strcmp(cmd, "/distintivo", true) == 0)
    {
        if(PlayerInfo[playerid][pLider] != 16 && PlayerInfo[playerid][pMembro] != 16)
            return SendClientMessage(playerid, COLOR_RED, "Vocк nгo й um Policial Civil.");

        if(distintivo[playerid] == 0) {
            distintivo[playerid] = 1;
            playertextid[playerid] = Create3DTextLabel("Policia Civil",COLOR_BLUE,0,0,0,40.0, 0);
            Attach3DTextLabelToPlayer(playertextid[playerid], playerid, 0.0, 0.0, 0.0);
            format(string, sizeof(string), "O policial civil %s colocou seu distintivo a mostra.", PlayerName(playerid));
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            return 1;
        }
       
        if(distintivo[playerid] == 1) {
            distintivo[playerid] = 0;
            Delete3DTextLabel(playertextid[playerid]); // warning 213: tag mismatch
            format(string, sizeof(string), "O policial civil %s guardou seu distintivo.", PlayerName(playerid));
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            return 1;
        }
Nгo esqueзa da variavel global:
pawn Код:
new Text3D:playertextid[MAX_PLAYERS];
Compilou sem erros, mas quando eu dou o comando no jogo o texto Policia Civil na skin do player nгo aparece =\
Reply
#6

Й porque aparece sу pros outros players, pra quem digitou o comando nгo aparece !
Reply
#7

Funcionou entгo REP+!!
Tem como eu colocar em negrito ou mais forte pq qse n da pra ver!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)