Koordinaten eines Wagens Herrausfinden

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
  • Okay Danke, dann noch eine Frage, also im Script ist rtext Definiert, aber mir wird der Rang trotzdem nicht Angezeigt? Wieso das, ich frage hier damit ich kein 2tes Thema erstelle


    if(strcmp(cmd,"/showmarke",true)==0)
    {
    new rtext[20];
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /showmarke [Playerid/TeilDesNamen]");
    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), "|***DIENSTMARKE***|");
    SendClientMessage(giveplayerid, COLOR_YELLOW, string);
    format(string, sizeof(string), "Name: %s ", sendername);
    SendClientMessage(giveplayerid, COLOR_YELLOW, string);
    format(string, sizeof(string), "Rang: %s ", rtext);
    SendClientMessage(giveplayerid, COLOR_YELLOW, string);
    format(string, sizeof(string), "|***DIENSTMARKE***|");
    SendClientMessage(giveplayerid, COLOR_YELLOW, string);
    format(string, sizeof(string), "* Du hast deine Dienstmarke %s gezeigt", giveplayer);
    SendClientMessage(playerid, COLOR_GREEN, string);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Spieler nicht in deiner nähe!");
    return 1;
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist Offline !");
    return 1;
    }
    }
    }
    }

  • So gehts aber immernoch nicht


    if(strcmp(cmd,"/showmarke",true)==0)
    {
    new rtext[64];
    if(gTeam[playerid] == 5 || PlayerInfo[playerid][pFMember] < 255)//The 2 Organisations
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Solitario"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Adepto"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Soldato"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Consiguere"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Destro"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Don"; }
    else { rtext = "Bambino"; }
    }
    else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)// Ranks
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Praktikant"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Polizeimeister-Anwärter"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Polizeimeister"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Polizeiobermeister"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Polizei-Ausbilder"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Polizeikommissar"; }
    else if(PlayerInfo[playerid][pRank] == 7) { rtext = "Polizeioberkommissar"; }
    else if(PlayerInfo[playerid][pRank] == 8) { rtext = "Polizeihauptkommissar"; }
    else if(PlayerInfo[playerid][pRank] == 9) { rtext = "Polizeiratsanwärter"; }
    else if(PlayerInfo[playerid][pRank] == 10) { rtext = "Polizeirat"; }
    else if(PlayerInfo[playerid][pRank] == 11) { rtext = "Polizeioberrat"; }
    else if(PlayerInfo[playerid][pRank] == 12) { rtext = "Polizeidirektor"; }
    else if(PlayerInfo[playerid][pRank] == 13) { rtext = "Polizei-Präsident"; }
    else { rtext = "Cadet"; }
    }
    else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//FBI Ranks
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Auszubildender Polizist"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Ausgebildeter Polizist"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Streifenpolizist-Zufuß"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Polizeistreife-Auto"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Pressesprecher der Polizei"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Einsatzleitung"; }
    else { rtext = "Cadet"; }
    }
    else if(PlayerInfo[playerid][pMember] == 19 || PlayerInfo[playerid][pLeader] == 19)//RS
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Anfänger"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Erfahrener"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Killer"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Elite"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Zweite Hand"; }
    else if(PlayerInfo[playerid][pRank] == 6 || PlayerInfo[playerid][pRank] == 12) { rtext = "Red King"; }
    else { rtext = "Neuling"; }
    }
    else if(PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pLeader] == 21)//WHEELMEN
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Anfänger"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Member"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Spezial Member"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Ausbilder"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Co-Leader"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Leader"; }
    else { rtext = "Anfänger"; }
    }
    else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//NG Ranks
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Private"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Sergeant"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Major"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Captain"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Lieutenant"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "General"; }
    else { rtext = "Private"; }
    }
    else if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Personenschutz-Azubi"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Personenschutz"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Personenschutz-Leiter"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Geheimdienst-Azubi"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Geheimdienst"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Geheimdienst Leiter"; }
    else if(PlayerInfo[playerid][pRank] >= 7 && PlayerInfo[playerid][pRank] < 12) { rtext = "Minister"; }
    else if(PlayerInfo[playerid][pRank] == 12) { rtext = "Bundespräsident"; }
    else { rtext = "Private"; }
    }
    else if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)//Hitman Ranks
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Azubi"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Söldner"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Attentäter"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Massenmörder"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Vize-Direktor"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Direktor"; }
    else { rtext = "Praktikant"; }
    }
    else if(PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pLeader] == 21)
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Neuling"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Söldner"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Attentäter"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Massenmörder"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Vize-Direktor"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Direktor"; }
    else { rtext = "Praktikant"; }
    }
    else if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)//NR Ranks
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Intern"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Local Reporter"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Local Editor"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Network Anchor"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Network Editor"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Network Producer"; }
    else { rtext = "Intern"; }
    }
    else if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)//Taxi Company Ranks
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Trainee"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Taxi Rookie"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Cabbie"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Dispatcher"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Shift Supervisor"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Taxi Company Owner"; }
    else { rtext = "Trainee"; }
    }
    else if(IsAnInstructor(playerid))//Driving/Flying School Ranks
    {
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Trainee"; }
    else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Instructor"; }
    else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Senior Instructor"; }
    else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Manager"; }
    else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Under Boss"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Boss"; }
    else { rtext = "Trainee"; }
    }
    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), "|***DIENSTMARKE***|");
    SendClientMessage(giveplayerid, COLOR_YELLOW, string);
    format(string, sizeof(string), "Name: %s ", sendername);
    SendClientMessage(giveplayerid, COLOR_YELLOW, string);
    format(string, sizeof(string), "Rang: %s ", rtext);
    SendClientMessage(giveplayerid, COLOR_YELLOW, string);
    format(string, sizeof(string), "|***DIENSTMARKE***|");
    SendClientMessage(giveplayerid, COLOR_YELLOW, string);
    format(string, sizeof(string), "Staatsfraktion: %s ", ftext);
    SendClientMessage(giveplayerid, COLOR_YELLOW, string);
    format(string, sizeof(string), "* Du hast deine Dienstmarke %s gezeigt", giveplayer);
    SendClientMessage(playerid, COLOR_GREEN, string);
    return 1;
    }

    Einmal editiert, zuletzt von Filip_D. ()