/gov für jede Fraktion || Bitte um Hilfe

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
  • Grundsätzlich sollte aber gelten: Hat man keine Vorkenntnisse in Sachen Programmierung, kann man das Scripten vergessen.


    Quatsch.
    Scripten ist generell möglich, solange man den Zusammenhang begreift.


    Mit freundlichen Grüßen
    Timothy.


    Du hast Probleme beim Programmieren oder mit deinem PC?
    Registriere Dich doch auf PC-Rat-Hilfeforum.de.
    Nach dem Registrieren musst du nur deine E-Mail-Adresse bestätigen,
    dann kann es auch schon losgehen. Also worauf wartest du?


    Erreichbar unter folgender E-Mail-Adresse
    support@pc-rat-hilfeforum.de

  • Hier ist mein kleines /gov "System"
    *falls es noch gebraucht wird :D


    //----------------------------------[government]-----------------------------------------------
    if(strcmp(cmd, "/government", true) == 0 || strcmp(cmd, "/gov", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gTeam[playerid] != 2 && !IsACop(playerid) && !IsPlayerInFrac(playerid, 1)&& !IsPlayerInFrac(playerid, 2) && !IsPlayerInFrac(playerid, 3)&& !IsPlayerInFrac(playerid, 4)&& !IsPlayerInFrac(playerid, 5)&& !IsPlayerInFrac(playerid, 6)&& !IsPlayerInFrac(playerid, 7)&& !IsPlayerInFrac(playerid, 8)&& !IsPlayerInFrac(playerid, 9)&& !IsPlayerInFrac(playerid, 10)&& !IsPlayerInFrac(playerid, 11) && !IsPlayerInFrac(playerid, 12)
    && !IsPlayerInFrac(playerid, 13)&& !IsPlayerInFrac(playerid, 14)&& !IsPlayerInFrac(playerid, 22)&& !IsPlayerInFrac(playerid, 15)&& !IsPlayerInFrac(playerid, 16)&& !IsPlayerInFrac(playerid, 17)&& !IsPlayerInFrac(playerid, 18)&& !IsPlayerInFrac(playerid, 19)&& !IsPlayerInFrac(playerid, 20)&& !IsPlayerInFrac(playerid, 21)&& !IsPlayerInFrac(playerid, 23)&& !IsPlayerInFrac(playerid, 24)&& !IsPlayerInFrac(playerid, 25))
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist kein Leader!");
    return 1;
    }
    if(PlayerInfo[playerid][pRank] < 5)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du benötigst mindestens Rang 5!");
    return 1;
    }
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext);
    SetTimerEx("govtimer", 1000*60, false, "d", playerid);
    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) [Nachricht]");
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 7)
    {
    SendClientMessageToAll(COLOR_WHITE,"||_______________Durchsage: Präsident____________________||");
    format(string, sizeof(string), "Regierung %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 11)
    {
    SendClientMessageToAll(COLOR_WHITE,"||_______________Durchsage: Präsident____________________||");
    format(string, sizeof(string), "Kanzler %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 10)
    {
    SendClientMessageToAll(COLOR_WHITE,"||_______________Durchsage: Präsident____________________||");
    format(string, sizeof(string), "Staatsminister %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 9)
    {
    SendClientMessageToAll(COLOR_WHITE,"||_______________Durchsage: Präsident____________________||");
    format(string, sizeof(string), "Finanzminister %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 8)
    {
    SendClientMessageToAll(COLOR_WHITE,"||_______________Durchsage: Präsident____________________||");
    format(string, sizeof(string), "Innenminister %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 7)
    {
    SendClientMessageToAll(COLOR_WHITE,"||_______________Durchsage: Präsident____________________||");
    format(string, sizeof(string), "Vorsitzender %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 6)
    {
    SendClientMessageToAll(COLOR_WHITE,"||_______________Durchsage: Geheimdienst____________________||");
    format(string, sizeof(string), "Leitender Geheimdienst %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 1)
    {
    SendClientMessageToAll(0x007DFFFF,"||_______________Durchsage: Los Santos Police Department____________________||");
    format(string, sizeof(string), "Polizeipräsident %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 23)
    {
    SendClientMessageToAll(0xFF3533FF,"||_______________Durchsage: Russenmafia____________________||");
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 2)
    {
    SendClientMessageToAll(0x0000FFFF,"||_______________Durchsage: Federal Bureo of Investigation____________________||");
    format(string, sizeof(string), "FBI Präsident %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 5)
    {
    SendClientMessageToAll(0x464646FF,"||_____________Durchsage: La Cosa Nostra____________________||");
    format(string, sizeof(string), "Don %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 6)
    {
    SendClientMessageToAll(0x844A00FF,"||______________Durchsage: Yakuza____________________||");
    format(string, sizeof(string), "Oyabun %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 12)
    {
    SendClientMessageToAll(0x4B0000FF,"||_____________Durchsage: Triaden____________________||");
    format(string, sizeof(string), "Boss %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 24)
    {
    SendClientMessageToAll(0x9BFF00FF,"||_____________Durchsage: Ordnungsamt____________________||");
    format(string, sizeof(string), "Geschäftsführer %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 8)
    {
    SendClientMessageToAll(0x141414FF,"||_____________Durchsage: Hitman Agentur____________________||");
    format(string, sizeof(string),"Director %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 13)
    {
    SendClientMessageToAll(0x00B900FF,"||_____________Durchsage: Grove Street Family____________________||");
    format(string, sizeof(string), "Oberhaupt %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 14)
    {
    SendClientMessageToAll(0xFF00D7FF,"||_____________Durchsage: All Saints Ballas____________________||");
    format(string, sizeof(string), "O.G Nigga %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 15)
    {
    SendClientMessageToAll(0x002722FF,"||_____________Durchsage: Biker Club____________________||");
    format(string, sizeof(string), "TopRacer %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 19)
    {
    SendClientMessageToAll(0xFF0000FF,"||_____________Durchsage: Red Soldiers____________________||");
    format(string, sizeof(string), "Red King %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 9)
    {
    SendClientMessageToAll(0xBFC0C2FF,"||_____________Durchsage: CNN ____________________||");
    format(string, sizeof(string), "Geschäftsführer %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 10)
    {
    SendClientMessageToAll(0xF5FF00FF,"||_____________Durchsage: Yellow Cap Taxi ____________________||");
    format(string, sizeof(string), "Geschäftsführer %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 11)
    {
    SendClientMessageToAll(0xB0C4DEFF,"||_____________Durchsage: Fahrschule ____________________||");
    format(string, sizeof(string), "Geschäftsführer %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 16)
    {
    SendClientMessageToAll(0xFFF000FF,"||_____________Durchsage: Vagos ____________________||");
    format(string, sizeof(string), "EL Vato %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 17)
    {
    SendClientMessageToAll(0xA000FFFF,"||_____________Durchsage: Aztecas ____________________||");
    format(string, sizeof(string), "Maestro %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 18)
    {
    SendClientMessageToAll(0x410000FF,"||_____________Durchsage: Rifas ____________________||");
    format(string, sizeof(string), "Radelsführer %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 4)
    {
    SendClientMessageToAll(0xFF7800FF,"||_______________Durchsage: San Andreas Medicial Center____________________||");
    format(string, sizeof(string), "Chef Arzt %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 20)
    {
    SendClientMessageToAll(0x646464FF,"||_______________Durchsage: Terroristen-Agency____________________||");
    format(string, sizeof(string), "Terrorist %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 22)
    {
    SendClientMessageToAll(0x003E00FF,"||_______________Durchsage: Feuerwehr____________________||");
    format(string, sizeof(string), "General %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 21)
    {
    SendClientMessageToAll(0x002C00FF,"||_______________Durchsage: Wheelman-Agency____________________||");
    format(string, sizeof(string), "Wheelman %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pLeader] == 3)
    {
    SendClientMessageToAll(0x003E00FF,"||_______________Durchsage: United States Army____________________||");
    format(string, sizeof(string), "General %s: %s", sendername, result);
    }
    else format(string, sizeof(string), "Staatsbeamter %s: %s", sendername, result);
    SendClientMessageToAll(0x00FF6EFF, string);
    }
    return 1;
    }