duty problem

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
  • also jedes mal wen ich on duty gehe springt mein skin auf irgendein cop skin obwohl ich fbi bin das natürlich net gut


    stelle ma den onduty absnitt hier rein



    if(strcmp(cmd, "/duty", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 3)
    {
    if (PlayerToPoint(60, playerid,217.2670,187.3875,1003.0313) || PlayerToPoint(60,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
    {
    if(OnDuty[playerid]==0)
    {
    format(string, sizeof(string), "* Officer %s holt deine waffe und seine marke aus seinem spint.", sendername);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    GivePlayerWeapon(playerid, 24, 100);
    GivePlayerWeapon(playerid, 25, 100);
    GivePlayerWeapon(playerid, 3, 0);
    OnDuty[playerid] = 1;



    SetPlayerToTeamColor(playerid);


    //
    if (PlayerInfo[playerid][pRank] == 6)
    {
    PlayerInfo[playerid][pChar] = 265;
    PlayerInfo[playerid][pModel] = 265;



    }
    else if (PlayerInfo[playerid][pRank] >= 2 && PlayerInfo[playerid][pRank] <= 5)
    {
    PlayerInfo[playerid][pChar] = 280;
    PlayerInfo[playerid][pModel] = 280;
    }
    else
    {
    PlayerInfo[playerid][pChar] = 71;
    PlayerInfo[playerid][pModel] = 71;
    }


    SpawnChange[playerid] = 0;
    SpawnPlayer(playerid);
    if (PlayerInfo[playerid][pRank] == 1)
    SetPlayerArmour(playerid,30);
    else if (PlayerInfo[playerid][pRank] == 2)
    SetPlayerArmour(playerid,60);
    else if (PlayerInfo[playerid][pRank] == 3)
    SetPlayerArmour(playerid,90);
    else if (PlayerInfo[playerid][pRank] == 4)
    SetPlayerArmour(playerid,120);
    else if (PlayerInfo[playerid][pRank] == 5)
    SetPlayerArmour(playerid,140);
    else if (PlayerInfo[playerid][pRank] == 6)
    SetPlayerArmour(playerid,180);


    PlayerInfo[playerid][pOldArmor] = 100;
    //PlayerInfo[playerid][pNewArmor] = 100;
    }
    else if(OnDuty[playerid]==1)
    {
    format(string, sizeof(string), "* Officer %s places their Badge and Gun in their locker.", sendername);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    SetPlayerToTeamColor(playerid);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 24, 7);
    OnDuty[playerid] = 0;
    SetPlayerToTeamColor(playerid);
    new rand = random(sizeof(CIV));
    PlayerInfo[playerid][pChar] = CIV[rand];
    PlayerInfo[playerid][pModel] = CIV[rand];
    SpawnChange[playerid] = 0;
    SpawnPlayer(playerid);
    SetPlayerArmour(playerid,0);
    SetPlayerHealth(playerid,100);
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You are not in a locker room !");
    return 1;
    }
    }
    else if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
    {
    if(JobDuty[playerid] == 1)
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Medic Job and will not receive calls anymore.");
    JobDuty[playerid] = 0;
    Medics -= 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Medic Job and will receive calls from people in need.");
    JobDuty[playerid] = 1;
    Medics += 1;
    }
    }
    else if(PlayerInfo[playerid][pJob] == 7)
    {
    if(JobDuty[playerid] == 1)
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Car Mechanic Job and will not receive calls anymore.");
    JobDuty[playerid] = 0;
    Mechanics -= 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Car Mechanic Job and will receive calls from people in need.");
    JobDuty[playerid] = 1;
    Mechanics += 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " You are not a Cop !");
    }
    }
    return 1;
    }

    LG micha

    Einmal editiert, zuletzt von Goldkiller ()

  • naja was willst machen die models sind klar definiert worden.
    bit du rank 6, was den leader beinhaltet, bekommst du model 265.
    bist du noch au rank 1 hast du das level 71 und
    wenn du rank 2, 3, 4, 5 bist hast halt das model 280.


    also wo ist da jetzt dein problem? oder was willst du erreichen??