[AYUDA] Tag mismatch
#1

pawn Код:
CMD:label(playerid, params[])
    {
        new Text3D:labelrep = CreatePlayer3DTextLabel(playerid,"````",0x008080FF,0.0,    0.0,      0.0,    40.0,                1,             0,               1);
   //                                                  (playerid, text[], color,  Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer, attachedvehicle, testLOS)
        //new Text3D:labelrep = Create3DTextLabel(playerid,"````", 0x008080FF, 0.0, 0.0, 0.0, 40.0, 1, 0, 0);
        Attach3DTextLabelToPlayer(labelrep, playerid, 0.0, 0.0, 0.0);
       
       return 1;
    }
warning en createplayer3dlabel. Lo hago igual (creo) y no anda... ?
Reply
#2

quita el "playerid".

pawn Код:
new Text3D:labelrep = CreatePlayer3DTextLabel("````",0x008080FF,0.0,    0.0,      0.0,    40.0,                1,             0,               1);
Reply
#3

ahora tira error argument type mismatch
Reply
#4

Estбs usando "Text3D:" en un Player3DTextLabel, deberнa de ser "PlayerText3D:".

pawn Код:
new PlayerText3D:labelrep = CreatePlayer3DTextLabel(playerid, "````", 0x008080FF, 0.0, 0.0, 0.0, 40.0, 1, 0, 1);
Creo que es ese el error.
Reply
#5

https://sampwiki.blast.hk/wiki/CreatePlayer3DTextLabel

Код:
new PlayerText3D:labelrep;
https://sampwiki.blast.hk/wiki/Create3DTextLabel

Код:
new Text3D:labelrep;
EDIT: me gano edu :S :/
Reply
#6

Graciasss

Edit: Uhh ahora tengo tag mismatch en Attach3DTextLabelToPlayer
Reply
#7

Estбs haciйndolo todo mal, no puedes atar un Player3DTextLabel a otro jugador (Por eso el tag mismatch). Ademбs, si creas asн ese TextLabel podrнas perder su ID y no podrбs destruirlo despuйs.


pawn Код:
new Text3D:PerPlayerLabel[MAX_PLAYERS];

CMD:label(playerid, params[])
{
    PerPlayerLabel[playerid] = Create3DTextLabel("````", 0x008080FF, 0.0, 0.0, 0.0, 40.0, 1, 0);
    Attach3DTextLabelToPlayer(PerPlayerLabel[playerid], playerid, 0.0, 0.0, 0.0);
    return true;
}

public OnPlayerDisconnect(playerid, reason)
{
    Destroy3DTextLabel(PerPlayerLabel[playerid]);
    return true;
}
Reply
#8

Me dice undefined symbol Destroy3DTextLabel

Edit: Ya lo solucione, el codigo quedo asi: (igual no anda)
pawn Код:
new Text3D:PerPlayerLabel[MAX_PLAYERS];
DestroyDynamic3DTextLabel(PerPlayerLabel[playerid]); // en onplayer disconnect
  CMD:label(playerid, params[])
{
    PerPlayerLabel[playerid] = CreateDynamic3DTextLabel("asdfasdf", 0x008080FF, 0.0, 0.0, 0.0, 40.0, 1, INVALID_VEHICLE_ID,1,5000,2);

    Attach3DTextLabelToPlayer(PerPlayerLabel[playerid], playerid, 0.0, 0.0, 0.0);
    return true;
}
De todas formas no pasa nada cuando pongo /label, alguna sugerencia?
Reply
#9

no te harб efecto ya que primero estas diciendo que la variable "perplayerlabel" se cree y elimine con las native del streamer, y lo atachas con uno tradicional (usan diferentes variables, nombres, hacen la mismas funciones, pero no harбn efecto).

mira bien la native "CreateDynamic3DTextLabel, allн mismo te da una opciуn de atachar el label al jugador sin necesidad de poner la native tradicional de SA-MP.

pawn Код:
native Text3D:CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
pawn Код:
new Text3D:PerPlayerLabel[MAX_PLAYERS];
DestroyDynamic3DTextLabel(PerPlayerLabel[playerid]); // en onplayer disconnect
CMD:label(playerid, params[])
{
    PerPlayerLabel[playerid] = CreateDynamic3DTextLabel("asdfasdf", 0x008080FF, 0.0, 0.0, 0.0, 40.0, playerid, INVALID_VEHICLE_ID);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)