[GF-ADDON] Dienstmarke

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 wollte noch sani hinzufügen habe dabei aber errors bekommen könnt ihr mir vieleicht weiterhelfen bitte wenns geht den korrigierten teil posten (danke)
    if(strcmp(cmd,"/dienstmarke",true)==0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1
    || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2
    || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3
    || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Fraktion die es haben / dürfen
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "BENUTZE: /dienstmarke [playerid/PartOfName]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    if (ProxDetectorS(8.0, playerid, giveplayerid))
    {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* %s hat dir seine Dienstmarke gezeigt.", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Du hast %s deine Dienstmarke gezeigt .", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* %s zeigt seine Dienstmarke %s.", sendername ,giveplayer);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new atext[20];
    if(PlayerInfo[playerid][pSex] == 1) { atext = "Männlich"; }
    else if(PlayerInfo[playerid][pSex] == 2) { atext = "Weiblich"; }
    new rtext[50];
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//LVPD RANKS
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "LV-Polizei Azubi"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "LV-Polizei Officer"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "LV-Polizeikommisar Anwärter"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "LV-Polizeikommisar"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "LV-Polizeirat Anwärter"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "LV-Polizeirat"; }
    else if(PlayerInfo[playerid][pRank] == 7) { rtext = "LV-Polizeioberrat Anwärter"; }
    else if(PlayerInfo[playerid][pRank] == 8) { rtext = "LV-Polizeioberrat"; }
    else if(PlayerInfo[playerid][pRank] == 9) { rtext = "LV-Polizeidirektor"; }
    else { rtext = "Officer"; }
    }
    else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//FBI RANKS
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Praktikant"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Agent Azubi"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Agent Anwärter"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Agent"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Spezial Agent"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Ausbilder"; }
    else if(PlayerInfo[playerid][pRank] == 7) { rtext = "Geheim Agent"; }
    else if(PlayerInfo[playerid][pRank] == 8) { rtext = "Meister Agent"; }
    else if(PlayerInfo[playerid][pRank] == 9) { rtext = "Direktor"; }
    else { rtext = "Intern"; }
    }
    else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//NATIONAL GUARD RANKS
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Sergeant Anwärter"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Sergeant"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Major Anwärter"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Major"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Captain Anwärter"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Captain"; }
    else if(PlayerInfo[playerid][pRank] == 7) { rtext = "Leutnant Anwärter"; }
    else if(PlayerInfo[playerid][pRank] == 8) { rtext = "Leutnant"; }
    else if(PlayerInfo[playerid][pRank] == 9) { rtext = "General"; }
    else { rtext = "Private"; }
    }
    else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Sani
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Praktikant"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Sanitäter"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Arzthelfer"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Arzt"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Notarzt"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Oberarzt"; }
    else if(PlayerInfo[playerid][pRank] == 7) { rtext = "Chirurg"; }
    else if(PlayerInfo[playerid][pRank] == 8) { rtext = "Co-Klinikchef"; }
    else if(PlayerInfo[playerid][pRank] == 9) { rtext = "Klinikchef"; }
    else { rtext = "Private"; }
    }
    new jtext[20];
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { jtext = "LVPD"; }
    else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) { jtext = "FBI Agent"; }
    else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) { jtext = "Bundeswehr"; }
    //das ist die problem zeile// else if[PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) { jtext = "Sanitäter"; }


    else { jtext = "None"; }
    format(string, sizeof(string), "|__________Dienstmarke von %s__________|",name);
    SendClientMessage(giveplayerid, COLOR_GREEN, string);
    format(string, sizeof(string), "Name: %s", name);
    SendClientMessage(giveplayerid, COLOR_WHITE, string);
    format(string, sizeof(string), "Geschlecht: %s", atext);
    SendClientMessage(giveplayerid, COLOR_WHITE, string);
    format(string, sizeof(string), "Beruf: %s", jtext);
    SendClientMessage(giveplayerid, COLOR_WHITE, string);
    format(string, sizeof(string), "Rang: %s", rtext);
    SendClientMessage(giveplayerid, COLOR_WHITE, string);
    format(string, sizeof(string), "|_____________________________________________|");
    SendClientMessage(giveplayerid, COLOR_GREEN, string);
    }//to far away
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Der Spieler ist nicht in deiner Nähe !");
    return 1;
    }
    }//invalid id
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Falscher Name / ID ");
    return 1;
    }
    }//connectet
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Der Spieler ist Offline !");
    return 1;
    }
    }
    }
    }

    Errors:
    C:\Users\Tim\Desktop\Bot\Gaming-Friend12.pwn(11747) : error 029: invalid expression, assumed zero
    C:\Users\Tim\Desktop\Bot\Gaming-Friend12.pwn(11747) : warning 215: expression has no effect
    C:\Users\Tim\Desktop\Bot\Gaming-Friend12.pwn(11747) : error 001: expected token: ";", but found ")"
    C:\Users\Tim\Desktop\Bot\Gaming-Friend12.pwn(11747) : error 029: invalid expression, assumed zero
    C:\Users\Tim\Desktop\Bot\Gaming-Friend12.pwn(11747) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.

  • 93
    else if[PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) { jtext = "Sanitäter"; }
    ich habs in gm eingefügt falls ihr denkt es ist im fs

  • if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { jtext = "LSPD"; }
    else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) { jtext = "FBI Agent"; }
    else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) { jtext = "National Guarde"; }
    else if(PlayerInfo[playerid][pMember] == 4|| PlayerInfo[playerid][pLeader] == 4) { jtext = "San itäter"; }


    Einfach einfügen.^^

  • wie währe es auch mit erklärung wo der fehler liegt ?


    Zitat


    93
    else if[PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) { jtext = "Sanitäter"; }
    ich habs in gm eingefügt falls ihr denkt es ist im fs

    da wos rot ist gehört eine ( statt [ hin

    „Auge um Auge - und die ganze Welt wird blind sein.“
    - Mahatma Gandhi

  • oh dann auch noma danke für die erklärung ich hätte es so auch net erkannt was anders ist aber funktioniert ja jetzt

  • Beitrag von saya ()

    Dieser Beitrag wurde gelöscht, Informationen über den Löschvorgang sind nicht verfügbar.