3DTextLabel Namen

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hallo Liebe Leute ich habe ein kleine Problem


    Folgendes:


    Ich habe jeden Admin ein Namen über den Kopf geben wie zb: Scripter aber jede spieler hat das


    Ihr die Codes:


    #define COLOR_REDA 0xFF0000FF//ServerOwner
    #define COLOR_LIGHTBLUE 0x33CCFFAA//Administrator
    #define COLOR_LIGHTGREEN 0x9ACD32AA//moderator
    #define COLOR_ORANGERED 0xFF4500AA//Scripter

    new Text3D:ServerOwner[MAX_PLAYERS];
    new Text3D:Scripter[MAX_PLAYERS];
    new Text3D:Administrator[MAX_PLAYERS];
    new Text3D:Administrator2[MAX_PLAYERS];
    new Text3D:Moderator[MAX_PLAYERS];



    Delete3DTextLabel(ServerOwner[playerid]);//Löscht den 3D Textlabel
    Delete3DTextLabel(Moderator[playerid]);//same
    Delete3DTextLabel(Scripter[playerid]);//same
    Delete3DTextLabel(Administrator[playerid]);//same
    Delete3DTextLabel(Administrator2[playerid]);//same

    public OnPlayerSpawn(playerid)
    {
    new scr[MAX_PLAYER_NAME];
    new Owner[MAX_PLAYER_NAME];
    new mod[MAX_PLAYER_NAME];
    new adm[MAX_PLAYER_NAME];


    if(PlayerInfo[playerid][pAdmin] == 1300) //admin
    {
    Owner = ".:Supporter:.";
    ServerOwner[playerid] = Create3DTextLabel(Owner,COLOR_REDA,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(ServerOwner[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(PlayerInfo[playerid][pAdmin] == 1400)//admin
    {
    mod = ".:Admin:.";
    Moderator[playerid] = Create3DTextLabel(mod,COLOR_REDA,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(Moderator[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(PlayerInfo[playerid][pAdmin] == 1500)//admin
    {
    adm = ".:Management:.";
    Administrator2[playerid] = Create3DTextLabel(adm,COLOR_REDA,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(Administrator2[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(PlayerInfo[playerid][pAdmin] == 1650)//admin
    {
    adm = ".:Management:.";
    Administrator[playerid] = Create3DTextLabel(adm,COLOR_REDA,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(Administrator[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(PlayerInfo[playerid][pAdmin] == 1700)//admin
    {
    scr = ".:Scripter:.";
    Scripter[playerid] = Create3DTextLabel(scr,COLOR_REDA,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(Scripter[playerid], playerid, 0.0, 0.0, 0.45);
    }


    Was habe ich falsch gemacht das jede Spieler das Hat


    oder kann mir das einer mit Namen Systeam machen


    Das Heist Testuser: Scripter
    Matze: Admin


    so in der Art

  • public OnPlayerSpawn(playerid)
    {
    if(PlayerInfo[playerid][pAdmin] == 1300) //admin
    {
    new Owner[MAX_PLAYER_NAME];
    Owner = ".:Supporter:.";
    ServerOwner[playerid] = Create3DTextLabel(Owner,COLOR_REDA,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(ServerOwner[playerid], playerid, 0.0, 0.0, 0.45);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1400)//admin
    {
    new mod[MAX_PLAYER_NAME];
    mod = ".:Admin:.";
    Moderator[playerid] = Create3DTextLabel(mod,COLOR_REDA,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(Moderator[playerid], playerid, 0.0, 0.0, 0.45);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1500)//admin
    {
    new adm[MAX_PLAYER_NAME];
    adm = ".:Management:.";
    Administrator2[playerid] = Create3DTextLabel(adm,COLOR_REDA,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(Administrator2[playerid], playerid, 0.0, 0.0, 0.45);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1650)//admin
    {
    new adm[MAX_PLAYER_NAME];
    adm = ".:Management:.";
    Administrator[playerid] = Create3DTextLabel(adm,COLOR_REDA,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(Administrator[playerid], playerid, 0.0, 0.0, 0.45);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1700)//admin
    {
    new scr[MAX_PLAYER_NAME];
    scr = ".:Scripter:.";
    Scripter[playerid] = Create3DTextLabel(scr,COLOR_REDA,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(Scripter[playerid], playerid, 0.0, 0.0, 0.45);
    }


    Ungetestet


  • Müsste gehn, hab keinen Fehler gefunden.


    Gruß Andy

    Du suchst ein Scripter der für "maximal" 5€ für dich Scriptet?


    Dann bist du bei mir genau richtig.

  • Du erstellst 2500 Platzhalter, bei maximal 500 Usern und lässt jedesmal wenn der User spawnt ihm ein Textlabel auf dem Kopf anwachsen aber entfernst es beim Ausloggen nur einmal?


    new Text3D:Rank[MAX_PLAYERS];


    public OnPlayerConnect( .. )
    {
    new Ranktext[14];
    if(PlayerInfo[playerid][pAdmin] == 1300) format(Ranktext,sizeof(Ranktext),".:Supporter:.");
    else if(PlayerInfo[playerid][pAdmin] == 1400)format(Ranktext,sizeof(Ranktext),".:Admin:.");
    else if(PlayerInfo[playerid][pAdmin] == 1500)format(Ranktext,sizeof(Ranktext),".:Management:.");
    else if(PlayerInfo[playerid][pAdmin] == 1650)format(Ranktext,sizeof(Ranktext),".:Management:.");
    else if(PlayerInfo[playerid][pAdmin] == 1700)format(Ranktext,sizeof(Ranktext),".:Scripter:.");
    else format(Ranktext,sizeof(Ranktext),"");
    Rank[playerid] = Create3DTextLabel(Ranktext,COLOR_REDA,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(Rank[playerid], playerid,0,0,0.45);
    return 1;
    }


    public OnPlayerDisconnect( .. )
    {
    Delete3DTextLabel(Rank[playerid]);
    return 1;
    }


    Freihand geschrieben und ungetestet, ist aber sicher simpler und sicherer!

    Why do programmers always mix up Halloween and Christmas?
    Oct 31 == Dec 25