/gov System für alle Fraktionen frei machen.

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.


    Ich wollte fragen ob man ein /gov System für jede Fraktion machen kann wie zbs wenn ich La Cosa Nostra bin und /gov mache {Muss mind. Rank 5 sein]



    ___La Cosa Nostra___
    RankName (Mein Name) : Die La Cosa Nostra sucht noch 5Member || Ab Lvl 3+Ts Pflicht

    Und das für jede Fraktion weil bei mir steht das hier:



    //----------------------------------[government]-----------------------------------------------
    if(strcmp(cmd, "/government", true) == 0 || strcmp(cmd, "/gov", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gTeam[playerid] != 2 && !IsACop(playerid) && !IsPlayerInFrac(playerid, 7)&& !IsPlayerInFrac(playerid, 24)&& !IsPlayerInFrac(playerid, 11))
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist kein Polizist !");
    return 1;
    }
    if(PlayerInfo[playerid][pRank] < 5)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du brauchst Rang 5 !");
    return 1;
    }
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: (/gov)ernment [text]");
    return 1;
    }
    SendClientMessageToAll(COLOR_WHITE, "|___________ Regierungsnachrichten ___________|");
    if(PlayerInfo[playerid][pLeader] == 7)
    {
    format(string, sizeof(string), "Bundespräsident %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 11)
    {
    format(string, sizeof(string), "Bundeskanzler %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] >= 7)
    {
    format(string, sizeof(string), "Minister %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 6)
    {
    format(string, sizeof(string), "Geheimdienst Leiter %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 11 || PlayerInfo[playerid][pLeader] == 11)
    {
    format(string, sizeof(string), "Fahrlehrer %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 1)
    {
    format(string, sizeof(string), "Polizei Pressesprecher %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 24 || PlayerInfo[playerid][pMember] == 24)
    {
    format(string, sizeof(string), "Ordnungsamtler %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 2)
    {
    format(string, sizeof(string), "Director of Secret Service %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 3)
    {
    format(string, sizeof(string), "General %s: %s", sendername, result);
    }
    else format(string, sizeof(string), "Beamter %s: %s", sendername, result);
    SendClientMessageToAll(COLOR_DBLUE, string);
    }
    return 1;
    }


  • Beitrag von iCoreX ()

    Dieser Beitrag wurde vom Autor aus folgendem Grund gelöscht: Lösung hat Gucci gepostet ().
  • Beitrag von GUCCI ()

    Dieser Beitrag wurde vom Autor gelöscht ().

  • //----------------------------------[government]-----------------------------------------------
    if(strcmp(cmd, "/government", true) == 0 || strcmp(cmd, "/gov", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pRank] < 5)
    {
    SendClientMessage(playerid, COLOR_GREY, "Du bist in keiner Fraktion oder hast nicht den entsprechenden Rank");
    return 1;
    }
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: (/gov)ernment [text]");
    return 1;
    }
    SendClientMessageToAll(COLOR_WHITE, "|___________ Nachricht ___________|");
    if(PlayerInfo[playerid][pMember] == 1)
    {
    format(string, sizeof(string), "Polizei Pressesprecher %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 2)
    {
    format(string, sizeof(string), "Director of Secret Service %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 3)
    {
    format(string, sizeof(string), "General %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 4)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 5)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 6)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 7)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 8)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 9)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 10)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 11)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 12)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 13)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 14)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 15)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 16)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 17)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 18)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 19)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 20)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 21)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 22)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 23)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 24)
    {
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else format(string, sizeof(string), "UNBEKANNT %s: %s", sendername, result);
    SendClientMessageToAll(COLOR_DBLUE, string);
    }
    return 1;
    }

    Mach es so, Gruesse :D