3dtextlabel nametags?
#1

I've seen it in two servers, I was wondering if anyone might have the code to do it?

I don't really understand how to do it correctly I just know you need to disable nametags, still a basic scripter.

Anyone might have a clue how to do it? I'll tip them 5$
Reply
#2

Click me!
After that click me!
If you understand that click me!
Reply
#3

Yeah you're about the 10th person who has said that, like I said before I'm not understanding where I would even start by making it make EVERY players a 3dtextlaval instead of a nametag.
Reply
#4

This at OnPlayerConnect:
pawn Код:
new string1[128], name[24];
    GetPlayerName(playerid, name, sizeof(name));
    label[playerid] = format(string1, sizeof(string), "%s",name);
    Create3DTextLabel(string1,0xFFFFFFFF,name,130,0,1);
    Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
Ontop of your script:
pawn Код:
new Text3D:label[MAX_PLAYERS];
NOTE: This will probably work if you disable all nametags first.

OnPlayerDisconnect:
pawn Код:
Delete3DTextLabel(label[playerid]);
Reply
#5

Don't forget to check my edit.
Reply
#6

Quote:

new string1[128], name[24];
GetPlayerName(playerid, name, sizeof(name));
label[playerid] = format(string1, sizeof(string), "%s",name);
Create3DTextLabel(string1,0xFFFFFFFF,name,130,0,1) ;
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);

This is erroring. I think I'm placing it in the wrong place atleast, where exactly in onplayerconnect?
Reply
#7

From where we can know what you have in OnPlayerConnect? if we see we can tell you where to place it.
Reply
#8

PHP код:
public OnPlayerConnect(playerid)
{
    
//Hungry[playerid] = 0;
     
new plname[MAX_PLAYER_NAME];
     
//    new giveplayerid;
    
new string[128];
    
IntentarTimmer[playerid] = 0Registrando[playerid] = 0Orejon[playerid] = 0VHabGolpeo[playerid] = 0AFK[playerid] = 0AdminDuty[playerid] = 0;
       
ResetearArmas(playerid); PlayerInfo[playerid][jSpawn] = 0PlayerInfo[playerid][jInt] = 0HelpMessages[playerid] = 0PlayerInfo[playerid][jClothes] = 0PlayerInfo[playerid][jTyrant] = 0;
       
IntentoDeLogear[playerid] = 0TieneBOMBA[playerid] = 0PlayerInfo[playerid][pPointsR] = 0PlayersChannel[playerid] = 0strmid(PlayerInfo[playerid][jPorSalio], "Unknown"0strlen("Unknown"), 255); strmid(PlayerInfo[playerid][pAccent], "None"0strlen("None"), 255);
    
CuentaExistente[playerid] = 0MascaraPuesta[playerid] = 0Desmayado[playerid] = 0gPlayerUsingLoopingAnim[playerid] = 0PlayerInfo[playerid][jBengala] = 0PlayerInfo[playerid][jVendas] = 0;
    
JugadorLogeado[playerid] = 0PlayerInfo[playerid][pAdmin] = 0PlayerInfo[playerid][jMember] = 0PlayerInfo[playerid][pBanned] = 0PlayerInfo[playerid][jLeader] = 0PlayerInfo[playerid][jWalkie] = 1PlayerInfo[playerid][jSintonia] = 0;
    
PlayerInfo[playerid][pWeapon] = 0PlayerInfo[playerid][pWeapon2] = 0PlayerInfo[playerid][pWeapon3] = 0PlayerInfo[playerid][pWeapondura] = 0PlayerInfo[playerid][jFosforos] = 0;
    
PlayerInfo[playerid][jAmmo] = 0PlayerInfo[playerid][jAmmo3] = 0PlayerInfo[playerid][jAmmo2] = 0PlayerInfo[playerid][jBotella] = 0;
     
PlayerInfo[playerid][jTazer] = 0PlayerInfo[playerid][jKitMed] = 0PlayerInfo[playerid][jEdad] = 0JustWhisp[playerid] = 0PlayerInfo[playerid][jEncendedor] = 0;
    
PlayerInfo[playerid][jInfectado] = 0PlayerInfo[playerid][jAimskill] = 0PlayerInfo[playerid][jMechskill] = 0PlayerInfo[playerid][jLuckskill] = 0PlayerInfo[playerid][jZombiesPT] = 0PlayerInfo[playerid][jSexo] = 0;
    
PlayerInfo[playerid][jTiempoDeCarcel] = 0PlayerInfo[playerid][jEncarcelado] = 0PlayerInfo[playerid][jZombie] = 0PlayerInfo[playerid][jTutorial] = 0PlayerInfo[playerid][jProfesion] = 0JustOOC[playerid] = 0;
    
GetPlayerName(playeridplnamesizeof(plname)); PlayerInfo[playerid][jFosforos] = 0TieneBOMBA[playerid] = 0LPuestos[playerid] = 0GPuesto[playerid] = 0PMBlockeado[playerid] = 0TRAJE[playerid] = 0;
    
JustReported[playerid] = 0Informacion[playerid][Manejando] = 0/*Audifono[playerid] = 0;*/ PlayerNeedsHelp[playerid] = 0JugadorListo[playerid] = 0ConTexto[playerid] = 0SinLeven[playerid] = 0;
    
format(stringsizeof(string), "TWD/accounts/%s.ini"plname);
    
SetPlayerVirtualWorld(playerid,0);
    
Timer[playerid] = SetTimerEx("Check"1001"i"playerid);
    if(!
IsRolePlayName(playerid))
    {
    
SendClientMessage(playerid,0xFF0000FF"You'll need a roleplay name before you play here. ('Firstname_Lastname')!");
    
Kick(playerid);
    }
    if(
IsPlayerNPC(playerid))
      {
        
gTeam[playerid] = EZOMBIE;
           
SpawnPlayer(playerid);
         return 
1;
       }
    if(
fexist(string))
    {
        
CuentaExistente[playerid] = 1;
        
format(stringsizeof(string), "Welcome back to The Walking Dead Roleplay!"Version);
        
SendClientMessage(playeridCELESTEstring);    }
    else
    {
        
CuentaExistente[playerid] = 0;
        
format(stringsizeof(string), "Welcome to The Walking Dead Roleplay!"Version);
        
SendClientMessage(playeridCELESTEstring);
    }
    
PlayerCount ++;
    return 
1;

Reply
#9

OnPlayerConnect:
pawn Код:
public OnPlayerConnect(playerid)
{
    //Hungry[playerid] = 0;
     new plname[MAX_PLAYER_NAME];
     
//    new giveplayerid;
    new string[128];
    IntentarTimmer[playerid] = 0; Registrando[playerid] = 0; Orejon[playerid] = 0; VHabGolpeo[playerid] = 0; AFK[playerid] = 0; AdminDuty[playerid] = 0;
       ResetearArmas(playerid); PlayerInfo[playerid][jSpawn] = 0; PlayerInfo[playerid][jInt] = 0; HelpMessages[playerid] = 0; PlayerInfo[playerid][jClothes] = 0; PlayerInfo[playerid][jTyrant] = 0;
       IntentoDeLogear[playerid] = 0; TieneBOMBA[playerid] = 0; PlayerInfo[playerid][pPointsR] = 0; PlayersChannel[playerid] = 0; strmid(PlayerInfo[playerid][jPorSalio], "Unknown", 0, strlen("Unknown"), 255); strmid(PlayerInfo[playerid][pAccent], "None", 0, strlen("None"), 255);
    CuentaExistente[playerid] = 0; MascaraPuesta[playerid] = 0; Desmayado[playerid] = 0; gPlayerUsingLoopingAnim[playerid] = 0; PlayerInfo[playerid][jBengala] = 0; PlayerInfo[playerid][jVendas] = 0;
    JugadorLogeado[playerid] = 0; PlayerInfo[playerid][pAdmin] = 0; PlayerInfo[playerid][jMember] = 0; PlayerInfo[playerid][pBanned] = 0; PlayerInfo[playerid][jLeader] = 0; PlayerInfo[playerid][jWalkie] = 1; PlayerInfo[playerid][jSintonia] = 0;
    PlayerInfo[playerid][pWeapon] = 0; PlayerInfo[playerid][pWeapon2] = 0; PlayerInfo[playerid][pWeapon3] = 0; PlayerInfo[playerid][pWeapondura] = 0; PlayerInfo[playerid][jFosforos] = 0;
    PlayerInfo[playerid][jAmmo] = 0; PlayerInfo[playerid][jAmmo3] = 0; PlayerInfo[playerid][jAmmo2] = 0; PlayerInfo[playerid][jBotella] = 0;
     PlayerInfo[playerid][jTazer] = 0; PlayerInfo[playerid][jKitMed] = 0; PlayerInfo[playerid][jEdad] = 0; JustWhisp[playerid] = 0; PlayerInfo[playerid][jEncendedor] = 0;
    PlayerInfo[playerid][jInfectado] = 0; PlayerInfo[playerid][jAimskill] = 0; PlayerInfo[playerid][jMechskill] = 0; PlayerInfo[playerid][jLuckskill] = 0; PlayerInfo[playerid][jZombiesPT] = 0; PlayerInfo[playerid][jSexo] = 0;
    PlayerInfo[playerid][jTiempoDeCarcel] = 0; PlayerInfo[playerid][jEncarcelado] = 0; PlayerInfo[playerid][jZombie] = 0; PlayerInfo[playerid][jTutorial] = 0; PlayerInfo[playerid][jProfesion] = 0; JustOOC[playerid] = 0;
    GetPlayerName(playerid, plname, sizeof(plname)); PlayerInfo[playerid][jFosforos] = 0; TieneBOMBA[playerid] = 0; LPuestos[playerid] = 0; GPuesto[playerid] = 0; PMBlockeado[playerid] = 0; TRAJE[playerid] = 0;
    JustReported[playerid] = 0; Informacion[playerid][Manejando] = 0; /*Audifono[playerid] = 0;*/ PlayerNeedsHelp[playerid] = 0; JugadorListo[playerid] = 0; ConTexto[playerid] = 0; SinLeven[playerid] = 0;
    format(string, sizeof(string), "TWD/accounts/%s.ini", plname);
    SetPlayerVirtualWorld(playerid,0);
    Timer[playerid] = SetTimerEx("Check", 100, 1, "i", playerid);
    if(!IsRolePlayName(playerid))
    {
    SendClientMessage(playerid,0xFF0000FF, "You'll need a roleplay name before you play here. ('Firstname_Lastname')!");
    Kick(playerid);
    }
    if(IsPlayerNPC(playerid))
      {
        gTeam[playerid] = EZOMBIE;
           SpawnPlayer(playerid);
         return 1;
       }
    if(fexist(string))
    {
        CuentaExistente[playerid] = 1;
        format(string, sizeof(string), "Welcome back to The Walking Dead Roleplay!", Version);
        SendClientMessage(playerid, CELESTE, string);    }
    else
    {
        CuentaExistente[playerid] = 0;
        format(string, sizeof(string), "Welcome to The Walking Dead Roleplay!", Version);
        SendClientMessage(playerid, CELESTE, string);
    }
    PlayerCount ++;
   
    new string1[128], name[24];
    GetPlayerName(playerid, name, sizeof(name));
    label[playerid] = format(string1, sizeof(string), "%s",name);
    Create3DTextLabel(string1,0xFFFFFFFF,name,130,0,1);
    Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
   
    return 1;
}
Inside OnPlayerDisconnect:
pawn Код:
Delete3DTextLabel(label[playerid]);
Ontop:
pawn Код:
new Text3D:label[MAX_PLAYERS];
Reply
#10

error 035: argument type mismatch (argument 3)
which is
Create3DTextLabel(string1,0xFFFFFFFF,name,130,0,1) ;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)