2 Problem | /admins & /spawnchange

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
  • Problem 1
    /admins


    Hei
    wie mache ich das wenn ich /admins mache das da steht
    Moderator:
    Supermoderater:
    Serveradmin
    Server Owner


    Pwn:
    if (strcmp(cmd, "/admins", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Adminstratoren Team");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1338)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string, 256, "Admin: %s Ph.: %d", sendername, PlayerInfo[giveplayerid][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    }
    }
    }
    return 1;
    }



    2prob
    /spawnchange


    So ich habs dat so
    /spawnchange Haus
    &
    /spawnchange beruf
    wie mache ich das wenn man /spawnchange macht
    das da steht Verwende: /spawnchange [Haus/Beruf]

  • zu dein erstes problem



    if (strcmp(cmd, "/admins", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Admins Online:");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    else if(PlayerInfo[i][pAdmin] >= 1337)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string, 256, "Server Owner: %s", sendername);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    else if(PlayerInfo[i][pAdmin] >= 6)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string, 256, "Server Admin: %s", sendername);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    else if(PlayerInfo[i][pAdmin] >= 3||PlayerInfo[i][pAdmin] >= 4||PlayerInfo[i][pAdmin] >= 5)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string, 256, "Super Moderator: %s", sendername);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    else if(PlayerInfo[i][pAdmin] >= 1||PlayerInfo[i][pAdmin] >= 2)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string, 256, "Moderator: %s", sendername);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    else
    {
    SendClientMessage(playerid,COLOR_WHITE,"Es sind momentan keine Admins online");
    }
    }
    }
    }
    return 1;
    }

    RFT

  • "Evo"Julian, dir ist auch hier klar, dass 1331 und 1 ein RIESEN Unterschied macht, oder? Wenn ja, dann brings im net falsch bei, bzw, machs ihm net falsch.


    if (strcmp(cmd, "/admins", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Admins Online:");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    else if(PlayerInfo[i][pAdmin] >= 1337)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string, 256, "Server Owner: %s", sendername);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    else if(PlayerInfo[i][pAdmin] >= 1336)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string, 256, "Server Admin: %s", sendername);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    else if(PlayerInfo[i][pAdmin] >= 1333||PlayerInfo[i][pAdmin] >= 1334||PlayerInfo[i][pAdmin] >= 1335)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string, 256, "Super Moderator: %s", sendername);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    else if(PlayerInfo[i][pAdmin] >= 1331||PlayerInfo[i][pAdmin] >= 1332)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string, 256, "Moderator: %s", sendername);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    else
    {
    SendClientMessage(playerid,COLOR_WHITE,"Es sind momentan keine Admins online");
    }
    }
    }
    }
    return 1;
    }

    ....C, C++, MYSQL & Pawn....
    "Just Living For The Right Codes !"


    sad
    a
    das
    d
    as
    das
    da


    da
    asdasd

  • 2 error

  • Hier bitte schön


    if (strcmp(cmd, "/admins", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "|____ HQ-G Administrator Online ____|");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pAdmin] >= 1 && Hide[i] == 0)
    {
    new admtext[64];
    if(PlayerInfo[i][pAdmin] == 4) { admtext = "ServerOwner"; }
    else if(PlayerInfo[i][pAdmin] == 3) { admtext = "ServerAdmin"; }
    else if(PlayerInfo[i][pAdmin] == 2) { admtext = "SuperModerator"; }
    else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Moderator"; }
    else { admtext = "Moderator"; }
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string, 256, "%s: %s TelefonNr.: %d", admtext, sendername, PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_WHITE, string);
    }
    }
    }
    }
    return 1;
    }


    Bei mir gehts perfekt