3d Texte über Admins

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
  • Ich habe es mal so versucht: (Dass über Admins ein bestimmtes Textlabel steht)


    new Text3D:Scripter[MAX_PLAYERS];
    new Text3D:Projektleiter[MAX_PLAYERS];


    In public OnPlayerDisconnect(playerid, reason):


    Delete3DTextLabel(Scripter[playerid]);
    Delete3DTextLabel(Projektleiter[playerid]);


    public OnPlayerSpawn(playerid):



    if (PlayerInfo[playerid][pSupporter] >= 1339)
    {
    Scripter[playerid] = Create3DTextLabel("<Scripter>",0x0000FFFF,0.0,0.0,0.0,40.0,0);
    Attach3DTextLabelToPlayer(Scripter[playerid], playerid, 0.0, 0.0, 0.7);
    }
    if(PlayerInfo[playerid][pAdmin] == 1450)
    {
    Projektleiter[playerid] = Create3DTextLabel("<Server Besitzer>",0xDF0000FF,0.0,0.0,0.0,0.0,0);
    Attach3DTextLabelToPlayer(Projektleiter[playerid], playerid, 0.0, 0.0, 0.7);
    }*/


    Dann kommen die Errors:
    C:\Users\Admin\Desktop\gm.pwn(5484) : error 010: invalid function or declaration
    C:\Users\Admin\Desktop\gm.pwn(5489) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.


    In denen Zeilen steht das:
    5484: if (PlayerInfo[playerid][pSupporter] >= 1)
    5489: if(PlayerInfo[playerid][pAdmin] == 1450)


    Was mache ich falsch?
    Gruss


    //////
    Niemand?

    Einmal editiert, zuletzt von TechLineX ()

  • Ein GF
    Editiertes GF.

    Einmal editiert, zuletzt von TechLineX ()

  • Das "
    */"


    Ist nur da, dass es in meinem Gameode erstmal kein Error gibt.


    Keiner??
    Hallo??:S

    2 Mal editiert, zuletzt von TechLineX ()

  • Oben zu den news


    new Text3D:ServerOwner[MAX_PLAYERS];
    new Text3D:SuperAdmin[MAX_PLAYERS];
    new Text3D:Administrator[MAX_PLAYERS];
    new Text3D:Moderator[MAX_PLAYERS];
    new Text3D:ServerManager[MAX_PLAYERS];
    new Text3D:Supporter[MAX_PLAYERS];


    Dan bei OnPlayerSPawn das der text angezeigt wird wenn der Admin/suporter spawnt


    new sup[MAX_PLAYER_NAME];
    new Owner[MAX_PLAYER_NAME];
    new mod[MAX_PLAYER_NAME];
    new adm[MAX_PLAYER_NAME];
    new Supporter[MAX_PLAYER_NAME];
    new ServerManager[MAX_PLAYER_NAME];


    if(PlayerInfo[playerid][pAdmin] == 1339) //adminlvl 4 =ServerOwner0.75,20.0,0,1
    {
    Owner = "ServerOwner";
    ServerOwner[playerid] = Create3DTextLabel(Owner,COLOR_REDA,0,0,0,20.5,1);
    Attach3DTextLabelToPlayer(ServerOwner[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(PlayerInfo[playerid][pAdmin] == 1)//adminlvl 1 =moderator :)
    {
    mod = "Moderator";
    Moderator[playerid] = Create3DTextLabel(mod,COLOR_LIGHTGREEN,0,0,0,20.5,1);
    Attach3DTextLabelToPlayer(Moderator[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(PlayerInfo[playerid][pAdmin] == 2)//adminlvl 2 =admin
    {
    adm = "Administrator";
    Administrator[playerid] = Create3DTextLabel(adm,COLOR_LIGHTBLUE,0,0,0,20.5,1);
    Attach3DTextLabelToPlayer(Administrator[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(PlayerInfo[playerid][pAdmin] == 4)//adminlvl 3=superadmin
    {
    sup = "SuperAdmin";
    SuperAdmin[playerid] = Create3DTextLabel(sup,COLOR_ORANGERED,0,0,0,20.5,1);
    Attach3DTextLabelToPlayer(SuperAdmin[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(PlayerInfo[playerid][pSupporter] >= 1)//adminlvl 15 Supporter
    {
    Supporter = "Supporter";
    SuperAdmin[playerid] = Create3DTextLabel(Supporter,COLOR_GREEN,0,0,0,20.5,1);
    Attach3DTextLabelToPlayer(SuperAdmin[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(PlayerInfo[playerid][pAdmin] == 1338)//adminlvl 16 ServerManager
    {
    ServerManager = "ServerManager";
    SuperAdmin[playerid] = Create3DTextLabel(ServerManager,COLOR_SERVER,0,0,0,20.5,1);
    Attach3DTextLabelToPlayer(SuperAdmin[playerid], playerid, 0.0, 0.0, 0.45);
    }


    und zu guter letzt Einma das unter OnPlayerDisconnect weil sonst wenn der Admin ID 0 hat wird es für den nächsten der mit der ID 0 Gejoint ist der text angezeigt!


    Delete3DTextLabel(ServerOwner[playerid]);
    Delete3DTextLabel(Moderator[playerid]);
    Delete3DTextLabel(SuperAdmin[playerid]);
    Delete3DTextLabel(Administrator[playerid]);
    Delete3DTextLabel(ServerManager[playerid]);
    Delete3DTextLabel(Supporter[playerid]);


    /edit der Theard stelle ist ja geband -.-

  • reinste Ressourcenverschwendung sag ich nur...
    wenn man etwas macht, ohne es jetzt böse zu meinen, sollte man versuchen Logischer vorzugehen...


    new Text3D:supports[MAX_PLAYERS];



    if(PlayerInfo[playerid][pAdmin] >= 1339)
    {
    supports[playerid] = Create3DTextLabel("ServerOwner",COLOR_REDA,0,0,0,20.5,1);
    Attach3DTextLabelToPlayer(supports[playerid], playerid, 0.0, 0.0, 0.45);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1)
    {
    supports[playerid] = Create3DTextLabel("Moderator",COLOR_REDA,0,0,0,20.5,1);
    Attach3DTextLabelToPlayer(supports[playerid], playerid, 0.0, 0.0, 0.45);
    }
    /*usw*/


    Unter OnPlayerDisconnect...


    if(PlayerInfo[playerid][pAdmin] > 0)Delete3DTextLabel(supports[playerid]);


    Warum für jeden Bereich eine neue Variable mit 500 Plätzen und das gleich 6x das ergibt 3000 Speicherplätze die ordentlich Ressourcen fressen da
    der Speicher im Endprodukt dem Script also dem Binären Teil freigehalten wird somit trotzdem Speicher frisst...
    Eine Variable reicht da doch vollkommen oder etwa nicht ?

    Mfg. BlackFoX_UD_ alias [BFX]Explosion


  • guten tag , ich habe die antwort von [BFX]∑xþ└øšîøµ genommen und versucht umzusetzen , jedoch
    habe ich 2 error die bestimmt leicht zu beheben sind , könntet ihr mir helfen?


    habe das oben eingefügt


    new Text3D:supports[MAX_PLAYERS];


    danach das bei onplayerspawn ganz unten .


    if(PlayerInfo[playerid][pAdmin] >= 1339)
    {
    supports[playerid] = Create3DTextLabel("ServerOwner",COLOR_REDA,0,0,0,20.5,1);
    Attach3DTextLabelToPlayer(supports[playerid], playerid, 0.0, 0.0, 0.45);
    }


    und das unter onplayerdisconnect ganz unten.


    if(PlayerInfo[playerid][pAdmin] > 0)Delete3DTextLabel(supports[playerid]);


    kriege 2 errors :
    C:\Dokumente und Einstellungen\probe\Desktop\xgf.pwn(3047) : error 010: invalid function or declaration = }
    if(TransportDuty[playerid] == 1)
    {
    TaxiDrivers -= 1;
    }
    else if(TransportDuty[playerid] == 2)
    {
    BusDrivers -= 1;
    }
    if(PlayerInfo[playerid][pJob] == 11)
    {
    if(JobDuty[playerid] == 1) { Medics -= 1; }
    }
    else if(PlayerInfo[playerid][pJob] == 7)
    {
    if(JobDuty[playerid] == 1) { Mechanics -= 1; }
    }
    if (PlayerInfo[playerid][pRoadblock] != 0)
    {
    RemoveRoadblock(playerid);
    }
    }


    if(PlayerInfo[playerid][pAdmin] > 0)Delete3DTextLabel(supports[playerid]); HIER FEHLER LAUT ERROR


    public SetPlayerSpawn(playerid)
    C:\Dokumente und Einstellungen\probe\Desktop\xgf.pwn(3796) : error 010: invalid function or declaration = if(PlayerInfo[playerid][pAdmin] >= 1339) HIER DER FEHLER SAGT ERROR
    {
    supports[playerid] = Create3DTextLabel("ServerOwner",COLOR_REDA,0,0,0,20.5,1);
    Attach3DTextLabelToPlayer(supports[playerid], playerid, 0.0, 0.0, 0.45);
    }


    hoffe auf eure hilfe

    Einmal editiert, zuletzt von The_Butcher ()

  • if (PlayerInfo[playerid][pSupporter] >= 1)


    Musst du mit dein Admin System Konfigurieren !


    Aus mein Admin Sys:
    Ganz Oben:


    new Text3D:ServerOwner[MAX_PLAYERS];
    new Text3D:SuperAdmin[MAX_PLAYERS];
    new Text3D:Administrator[MAX_PLAYERS];
    new Text3D:Moderator[MAX_PLAYERS];[



    OnPlayerSpawn:
    new sup[MAX_PLAYER_NAME];
    new Owner[MAX_PLAYER_NAME];
    new mod[MAX_PLAYER_NAME];
    new adm[MAX_PLAYER_NAME];


    if(Player[playerid][admin] == 4) //adminlvl 4 =ServerOwner könnt auch 1337 Admin lvl
    {
    Owner = "-| ServerOwner |-";
    ServerOwner[playerid] = Create3DTextLabel(Owner,COLOR_REDA,0,0,0,20,1);
    Attach3DTextLabelToPlayer(ServerOwner[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(Player[playerid][admin] == 1)//adminlvl 1 =moderator :)
    {
    mod = "-| Supporter |-";
    Moderator[playerid] = Create3DTextLabel(mod,COLOR_WHITE,0,0,0,20,1);
    Attach3DTextLabelToPlayer(Moderator[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(Player[playerid][admin] == 2)//adminlvl 2 =admin
    {
    adm = "-| Administrator -";
    Administrator[playerid] = Create3DTextLabel(adm,COLOR_WHITE,0,0,0,20,1);
    Attach3DTextLabelToPlayer(Administrator[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(Player[playerid][admin] == 3)//adminlvl 3=superadmin
    {
    sup = "-| SuperAdmin |-";
    SuperAdmin[playerid] = Create3DTextLabel(sup,COLOR_WHITE,0,0,0,20,1);
    Attach3DTextLabelToPlayer(SuperAdmin[playerid], playerid, 0.0, 0.0, 0.45);
    }



    PlayerDiscon:
    Delete3DTextLabel(ServerOwner[playerid]);//Löscht den 3D Textlabel
    Delete3DTextLabel(Moderator[playerid]);//same
    Delete3DTextLabel(SuperAdmin[playerid]);//same
    Delete3DTextLabel(Administrator[playerid]);//same



    Lg L3uX hoffe konnte dir helfen

  • new Text3D:AdminLabel[MAX_PLAYERS];


    if(Player[playerid][admin] == 1)
    {
    AdminLabel[playerid] = Create3DTextLabel("Supporter",COLOR_REDA,0,0,0,20,1);
    Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(Player[playerid][admin] == 1)
    {
    AdminLabel[playerid] = Create3DTextLabel("Administrator",COLOR_REDA,0,0,0,20,1);
    Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(Player[playerid][admin] == 1)
    {
    AdminLabel[playerid] = Create3DTextLabel("SuperAdmin",COLOR_REDA,0,0,0,20,1);
    Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid, 0.0, 0.0, 0.45);
    }
    if(Player[playerid][admin] == 1)
    {
    AdminLabel[playerid] = Create3DTextLabel("ServerOwner",COLOR_REDA,0,0,0,20,1);
    Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid, 0.0, 0.0, 0.45);
    }


    man muss doch nicht für jedem Rang extra eins Definieren, das hier funktioniert auch wunderbar ;)