Bug im GF Script

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 alle zusammen,


    habe mir hier ein Script von einem Gf geladen und möchte dies stark editieren,
    vieles hab ich hinbekommen, aber es gibt da ein bug den ich nicht wegbekommen,
    deswegen hoffe ich ihr könnt mir helfen.


    Wenn ich mich invite als Leader des Lspd´s und dann duty gehen will
    kommt du bist kein Cop.


    Wie bekomm ich dass weg, hoffe um zahlreiche hilfe.


    danke


    /EDIT:


    Dutybefehl



    if(strcmp(cmd, "/duty", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(PlayerInfo[playerid][pMember] == 1)
    {
    if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,240.3304,78.7651,1005.0391) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
    {
    if(OnDuty[playerid]==0)
    {
    format(string, sizeof(string), "* Officer %s took a Badge and a Gun from his locker.", sendername);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 3, 0);
    OnDuty[playerid] = 1;
    }
    else if(OnDuty[playerid]==1)
    {
    format(string, sizeof(string), "* Officer %s places his Badge and Gun in his locker.", sendername);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    GivePlayerWeapon(playerid, 23, 150);
    GivePlayerWeapon(playerid, 5, 0);
    OnDuty[playerid] = 0;
    }
    }
    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;
    }
    Invitebefehl:


  • versuch es mal so hier


    if(strcmp(cmd, "/duty", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
    {

  • Setz mal bitte deine Befehl im pawn-code.
    Ähm es liegt höchstwarscheinlich daran dass du nicht team 2 bist.
    mach mal mit dir /setteam [id] 2 dann müsste es gehen
    MfG


    Destiny - RealLife is coming SOON!
    Wir sind zurück besser als je zuvor! :*

  • Ne, liegt dadran, dass er sich wahrscheinlich Leader gemacht hat und /duty nur für Member geht.


    if(PlayerInfo[playerid][pMember] == 1) daraus:


    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)


    machen, wie Cal44 es schon geschrieben hat!

  • PAWN Quelltext
    1
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)



    dies hab ich im script auch schon umgescriptet gerade aber leider funktioniert es
    immer noch nicht :O


    Leider ist es sehr komisch dass ich /su machen kann aber kein /clear
    denn dann kommt du bist kein cop /fbi / ...

  • Füg bitte die Befehle im pwn code ein damit wir dir besser helfen können
    ist ja augenkrebs...

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Hier nimm mal meinen.. bei mir kanns jeder Leader/Member von Fraktion 1,2,3 ( Cops,FBI,Army )


    if(strcmp(cmd, "/duty", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
    {
    if (PlayerToPoint(3, playerid,230.4189,73.5129,1005.0391) || PlayerToPoint(3,playerid,725.6745,-1440.3232,13.5391) || PlayerToPoint(3,playerid,915.1425,-1235.1122,17.2109) || PlayerInfo[playerid][pLocal] != 255)
    {
    if(OnDuty[playerid]==0)
    {
    format(string, sizeof(string), "* Officer %s took a Badge and a Gun from his locker.", sendername);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 3, 1);
    GivePlayerWeapon(playerid, 41,700);
    SetPlayerHealth(playerid,100);
    SetPlayerArmour(playerid,100);
    OnDuty[playerid] = 1;
    }
    else if(OnDuty[playerid]==1)
    {
    format(string, sizeof(string), "* Officer %s places his Badge and Gun in his locker.", sendername);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    OnDuty[playerid] = 0;
    }
    }
    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;
    }


    Destiny - RealLife is coming SOON!
    Wir sind zurück besser als je zuvor! :*