Beiträge von SHORE

    Jo hab jetzt extra im LOH Script nachgeschaut, dort steht es unter



    public OnPlayerLogin(playerid,password[])


    Dann schaust du unter diesem Public an dieser Stelle und änderst das unten Komentierte in eine 4



    if(PlayerInfo[playerid][pReg] == 0)
    {
    PlayerInfo[playerid][pLevel] = 1; // Hier die 1 in eine 4 ändern
    PlayerInfo[playerid][pSHealth] = 0.0;
    PlayerInfo[playerid][pHealth] = 99.0;
    PlayerInfo[playerid][pPos_x] = 2246.6;

    Setz einfach unter OnPlayerRegister (ich weiß nicht ob es so heißt im LOH Script) das hier hin, Die stelle wo sich der Spieler Registriert.


    SpielerInfo[playerid][Level] = 4; // mit deinem Code ersetzen natürlich :D



    //edit1 aus 0 4 gemacht :D

    new AdminLevel[20];
    if(SpielerInfo[playerid][pAdmin] == 1) { AdminLevel = "Was angezeigt werden soll"; }
    else if(SpielerInfo[playerid][pAdmin] == 2) { AdminLevel = "Was angezeigt werden soll"; }
    else if(SpielerInfo[playerid][pAdmin] == 3) { AdminLevel = "Was angezeigt werden soll"; }


    beispiel:


    format(beispiel,sizeof(beispiel),"AdminLevel: %s", AdminLevel);

    hab hier eins mit gTeam, solltes du normal Problemlos ändern können



    Unter Ongamemode init


    Textdraw0 = TextDrawCreate(447.000000,308.000000,"Team Info:");
    Textdraw1 = TextDrawCreate(415.000000,320.000000," /");
    Textdraw2 = TextDrawCreate(419.000000,352.000000,"- Team: ");
    Textdraw3 = TextDrawCreate(419.000000,373.000000,"- Waffen: ");
    Textdraw4 = TextDrawCreate(419.000000,391.000000,"- Spawn: ");
    Textdraw5 = TextDrawCreate(419.000000,406.000000,"- Farbe: ");
    TextDrawUseBox(Textdraw1,1);
    TextDrawBoxColor(Textdraw1,0x00000099);
    TextDrawTextSize(Textdraw1,589.000000,-1.000000);
    TextDrawAlignment(Textdraw0,0);
    TextDrawAlignment(Textdraw1,0);
    TextDrawAlignment(Textdraw2,0);
    TextDrawAlignment(Textdraw3,0);
    TextDrawAlignment(Textdraw4,0);
    TextDrawAlignment(Textdraw5,0);
    TextDrawBackgroundColor(Textdraw0,0x000000ff);
    TextDrawBackgroundColor(Textdraw1,0x000000ff);
    TextDrawBackgroundColor(Textdraw2,0x000000ff);
    TextDrawBackgroundColor(Textdraw3,0x000000ff);
    TextDrawBackgroundColor(Textdraw4,0x000000ff);
    TextDrawBackgroundColor(Textdraw5,0x000000ff);
    TextDrawFont(Textdraw0,3);
    TextDrawLetterSize(Textdraw0,0.599999,1.800000);
    TextDrawFont(Textdraw1,3);
    TextDrawLetterSize(Textdraw1,-1.099999,129.599990);
    TextDrawFont(Textdraw2,3);
    TextDrawLetterSize(Textdraw2,0.199999,1.400000);
    TextDrawFont(Textdraw3,3);
    TextDrawLetterSize(Textdraw3,0.199999,1.400000);
    TextDrawFont(Textdraw4,3);
    TextDrawLetterSize(Textdraw4,0.199999,1.400000);
    TextDrawFont(Textdraw5,3);
    TextDrawLetterSize(Textdraw5,0.199999,1.400000);
    TextDrawColor(Textdraw0,0xffffffff);
    TextDrawColor(Textdraw1,0xffffffff);
    TextDrawColor(Textdraw2,0xffffffff);
    TextDrawColor(Textdraw3,0xffffffff);
    TextDrawColor(Textdraw4,0xffffffff);
    TextDrawColor(Textdraw5,0xffffffff);
    TextDrawSetOutline(Textdraw0,1);
    TextDrawSetOutline(Textdraw1,1);
    TextDrawSetOutline(Textdraw2,1);
    TextDrawSetOutline(Textdraw3,1);
    TextDrawSetOutline(Textdraw4,1);
    TextDrawSetOutline(Textdraw5,1);
    TextDrawSetProportional(Textdraw0,1);
    TextDrawSetProportional(Textdraw1,1);
    TextDrawSetProportional(Textdraw2,1);
    TextDrawSetProportional(Textdraw3,1);
    TextDrawSetProportional(Textdraw4,1);
    TextDrawSetProportional(Textdraw5,1);
    TextDrawSetShadow(Textdraw0,1);
    TextDrawSetShadow(Textdraw1,1);
    TextDrawSetShadow(Textdraw2,1);
    TextDrawSetShadow(Textdraw3,1);
    TextDrawSetShadow(Textdraw4,1);
    TextDrawSetShadow(Textdraw5,1);



    public HideTeamInfo(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    TextDrawHideForPlayer(playerid, Text:Textdraw0);
    TextDrawHideForPlayer(playerid, Text:Textdraw1);
    TextDrawHideForPlayer(playerid, Text:Textdraw2);
    TextDrawHideForPlayer(playerid, Text:Textdraw3);
    TextDrawHideForPlayer(playerid, Text:Textdraw4);
    TextDrawHideForPlayer(playerid, Text:Textdraw5);
    }
    }


    public Teaminfo(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    new TeamInfo[61], Team[61];
    new WeaponInfo[61], Waffen[61];
    new SpawnInfo[61], Spawn[61];
    new ColorInfo[61], Farbe[61];
    new name[MAX_PLAYER_NAME];


    GetPlayerName(playerid,name,sizeof name);


    if(gTeam[playerid] == TEAM_CAMPER) { Team = "~r~Camper"; }
    else if(gTeam[playerid] == TEAM_WHORE) { Team = "~r~Whore"; }
    else if(gTeam[playerid] == TEAM_FARMER) { Team = "~r~Farmer"; }
    else if(gTeam[playerid] == TEAM_PIMP) { Team = "~r~Pimp"; }
    else if(gTeam[playerid] == TEAM_HOMELESS) { Team = "~r~Homeless"; }
    format(TeamInfo, sizeof(TeamInfo), "- Team: %s", Team);


    if(gTeam[playerid] == TEAM_CAMPER) { Waffen = "~r~Sd-Pistole, MP5, Messer, Rifle"; }
    else if(gTeam[playerid] == TEAM_WHORE) { Waffen = "~r~Sniper, Tec9, Shotgun, Messer"; }
    else if(gTeam[playerid] == TEAM_FARMER) { Waffen = "~r~Granate, Schlagring, Uzi, Ak47"; }
    else if(gTeam[playerid] == TEAM_PIMP) { Waffen = "~r~Deagle, M4, ShawnOff, Raketenwerfer"; }
    else if(gTeam[playerid] == TEAM_HOMELESS) { Waffen = "~r~Deagle, M4, ShawnOff, Raketenwerfer"; }
    format(WeaponInfo, sizeof(WeaponInfo), "- Waffen: %s", Waffen);


    if(gTeam[playerid] == TEAM_CAMPER) { Spawn = "~r~San Fierro"; }
    else if(gTeam[playerid] == TEAM_WHORE) { Spawn = "~r~Las Venturas"; }
    else if(gTeam[playerid] == TEAM_FARMER) { Spawn = "~r~Los Santos"; }
    else if(gTeam[playerid] == TEAM_PIMP) { Spawn = "~r~Las Venturas"; }
    else if(gTeam[playerid] == TEAM_HOMELESS) { Spawn = "~r~San Fierro"; }
    format(SpawnInfo, sizeof(SpawnInfo), "- Waffen: %s", Spawn);


    if(gTeam[playerid] == TEAM_CAMPER) { Farbe = "~r~Orange"; }
    else if(gTeam[playerid] == TEAM_WHORE) { Farbe = "~r~Pink"; }
    else if(gTeam[playerid] == TEAM_FARMER) { Farbe = "~r~Braun"; }
    else if(gTeam[playerid] == TEAM_PIMP) { Farbe = "~r~Lila"; }
    else if(gTeam[playerid] == TEAM_HOMELESS) { Farbe = "~r~Hell Braun"; }
    format(ColorInfo, sizeof(ColorInfo), "- Farbe: %s", Farbe);


    HideTeamInfo(playerid);
    TextDrawShowForPlayer(playerid, Text:Textdraw0);
    TextDrawShowForPlayer(playerid, Text:Textdraw1);
    TextDrawSetString(Text:Textdraw2, TeamInfo);
    TextDrawShowForPlayer(playerid, Text:Textdraw2);
    TextDrawSetString(Text:Textdraw3, WeaponInfo);
    TextDrawShowForPlayer(playerid, Text:Textdraw3);
    TextDrawSetString(Text:Textdraw4, SpawnInfo);
    TextDrawShowForPlayer(playerid, Text:Textdraw4);
    TextDrawSetString(Text:Textdraw5, ColorInfo);
    TextDrawShowForPlayer(playerid, Text:Textdraw5);
    }


    Unter jedem Team in der SKinauswahl setzt du dann einfach Teaminfo(playerid);
    }

    Ist eigendlich ganz einfach, aber zu faul zum erklären, schick mal dein Code den du geändert haben möchtest dann kann ich dir weiterhelfen


    Habs noch auf der Platte gehabt.


    for(new h = 0; h < sizeof(HouseInfo); h++)
    {
    if(PlayerToPoint(6.0, i, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
    {
    if(HouseInfo[h][hOwned] == 1)
    {
    if(HouseInfo[h][hRentabil] == 0)
    {
    format(string, sizeof(string), "Dieses Haus gehoert \n%s\nLevel: %d",HouseInfo[h][hOwner],HouseInfo[h][hLevel]);
    }
    else
    {
    format(string, sizeof(string), "Dieses Haus gehoert\n%s\nMiete: %d$ Level: %d\nTippe /rentroom um einen Raum zu mieten",HouseInfo[h][hOwner],HouseInfo[h][hRent],HouseInfo[h][hLevel]);
    }
    Create3DTextLabel(string, 0x00CC33FF, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 7, 0, 1);
    return 1;
    }
    else
    {
    format(string, sizeof(string), "Dieses Haus ist zu kaufen\nBeschreibung: %s \nKosten: %d$\nLevel: %d\n/buyhouse um es zu kaufen",HouseInfo[h][hDiscription],HouseInfo[h][hValue],HouseInfo[h][hLevel]);
    }
    Create3DTextLabel(string, 0x00CC33FF, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 7, 0, 1);
    return 1;
    }
    }



    // edit sein Wunsch hinzugefügt

    Mom eben... ich hab das irgendwo rumfliegen ;) kurzen moment


    oben ins Script
    // ----------------------- supporter level ---------------------------- //
    #define AdminLevel1 "Moderator"
    #define AdminLevel2 "Administrator"
    #define AdminLevel3 "Super Administrator"
    #define AdminLevel4 "Server Manager"
    #define AdminLevel5 "Server Owner"


    ebenfalls oben ins Script
    // ----------------------- label color ---------------------------- //
    #define SupColor 0x21DD00FF


    new Text3D:TextLabelAdmLevel1[MAX_PLAYERS],
    Text3D:TextLabelAdmLevel2[MAX_PLAYERS],
    Text3D:TextLabelAdmLevel3[MAX_PLAYERS],
    Text3D:TextLabelAdmLevel4[MAX_PLAYERS],
    Text3D:TextLabelAdmLevel5[MAX_PLAYERS];


    unter OnPlayerSpawn
    if (PlayerInfo[playerid][pAdmin] == 1)
    {
    TextLabelAdmLevel1[playerid] = Create3DTextLabel(AdminLevel1,SupColor,0,0,0,30.0,-1,true);
    Attach3DTextLabelToPlayer(TextLabelAdmLevel1[playerid], playerid, 0.0, 0.0, 0.35);
    }
    else if (PlayerInfo[playerid][pAdmin] == 2)
    {
    TextLabelAdmLevel2[playerid] = Create3DTextLabel(AdminLevel2,SupColor,0,0,0,30.0,-1,true);
    Attach3DTextLabelToPlayer(TextLabelAdmLevel2[playerid], playerid, 0.0, 0.0, 0.35);
    }
    else if (PlayerInfo[playerid][pAdmin] == 3)
    {
    TextLabelAdmLevel3[playerid] = Create3DTextLabel(AdminLevel3,SupColor,0,0,0,30.0,-1,true);
    Attach3DTextLabelToPlayer(TextLabelAdmLevel3[playerid], playerid, 0.0, 0.0, 0.35);
    }
    else if (PlayerInfo[playerid][pAdmin] == 4)
    {
    TextLabelAdmLevel4[playerid] = Create3DTextLabel(AdminLevel4,SupColor,0,0,0,30.0,-1,true);
    Attach3DTextLabelToPlayer(TextLabelAdmLevel4[playerid], playerid, 0.0, 0.0, 0.35);
    }
    else if (PlayerInfo[playerid][pAdmin] == 5)
    {
    TextLabelAdmLevel5[playerid] = Create3DTextLabel(AdminLevel5,SupColor,0,0,0,30.0,-1,true);
    Attach3DTextLabelToPlayer(TextLabelAdmLevel5[playerid], playerid, 0.0, 0.0, 0.35);
    }
    Sollte so eigendlich funktionieren


    Andere Version (keine ahnung obs funktioniert, ungetestet)

    #define SupColor 0x21DD00FF


    new AdminLabel[MAX_PLAYERS],
    FirstSpawn[MAX_PLAYERS];


    main(){}


    public OnPlayerConnect(playerid)
    {
    FirstSpawn[playerid] = 1;
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    FirstSpawn[playerid] = 0;
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    if (FirstSpawn[playerid] == 1)
    {
    new Label[64];
    if(PlayerInfo[playerid][pAdmin] == 1) { Label = "Moderator"; }
    else if(PlayerInfo[playerid][pAdmin] == 2) { Label = "Administrator"; }
    else if(PlayerInfo[playerid][pAdmin] == 3) { Label = "Super Admin"; }
    else if(PlayerInfo[playerid][pAdmin] == 4) { Label = "Server Manager"; }
    else if(PlayerInfo[playerid][pAdmin] == 5) { Label = "Server Owner"; }
    AdminLabel[playerid] = Create3DTextLabel(Label, SupColor,0,0,0,30.0,-1,true);
    Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid, 0.0, 0.0, 0.35);
    FirstSpawn[playerid] = 0;
    }
    return 1;
    }


    Hier Link zum zweiten


    // edit1 code hinzugefügt
    // edit2 andere version hinzugefügt
    // edit3 zweite version geändert
    // edit4 was gefixt im zweiten, pastepin pink hinzugefügt

    Ungetestet!


    Ganz oben
    new SupMobil[MAX_PLAYERS];


    public OnPlayerDisconnect(playerid, reason)
    {
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    if(vehicle==SupMobil[playerid])
    {
    DestroyVehicle(SupMobil[playerid]);
    }
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    if(vehicle==SupMobil[playerid])
    {
    DestroyVehicle(SupMobil[playerid]);
    }
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp(cmd, "/supmobil", true) == 0)
    {
    if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pSupporter] >= 1)
    {
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X,Y,Z);
    SupMobil[playerid] = CreateVehicle(583, x+3,y+3,z+3,0.0,160,160,60);
    SendClientMessage(playerid, COLOR_YELLOW, "Du hast dir ein Supportermobil gespawnt!");
    }
    else
    {
    SendClientMessage(playerid, COLOR_YELLOW, "Du kannst diesem Befehl nicht benutzen!!");
    }
    return 1;
    }
    return 0;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    if(vehicleid==SupMobil[playerid])
    {
    DestroyVehicle(SupMobil[playerid]);
    }
    return 1;
    }