Gangfight System Bug

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
  • Guten Tag,


    Ich nutze das Gangfightsystem aus dem GNE Script und habe da ein Problem:
    Ich habe es so gemacht ,dass man wenn man jemanden tötet, 2 Wanteds bekommt. (Spieler die nichts mit dem Gangfight zu tun haben)
    Nun habe ich das Problem seitdem ich das Gangfight System habe, dass man nurnoch
    im Gangfightgebiet Wanteds bekommt und außerhalb des Gebietes keine mehr bekommt.




    MFG,
    XDFanta


    Jeder hat hier nen geilen Text stehen außer mir ._. <3

  • Also hier ist das mit dem Automatischen Wanted :


    if(IsPlayerConnected(killerid))
    {
    if(!IsACop(killerid))
    {
    WantedLevel[killerid] += 2;
    SetPlayerWantedLevel(killerid,2);
    SendClientMessage(killerid, COLOR_LIGHTRED, "Du hast ein Verbrechen begangen ( Mord ). Zeuge: Unbekannt.");
    new message[128];
    format(message, sizeof(message), "Vergebene Wanteds: 2. Neues Wantedlevel: %d", WantedLevel[killerid]);
    SendClientMessage(killerid, COLOR_YELLOW, message);
    new killername[MAX_PLAYER_NAME];
    GetPlayerName(killerid,killername,sizeof(killername));
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsACop(i))
    {
    SendClientMessage(i, TEAM_BLUE_COLOR, "HQ: Alle Einheiten: Reporter: Unbekannt, Vergebene Wanteds: 2");
    format(string, sizeof(string), "HQ: Verbrechen: Mord, Gesuchter: %s, Aktuelle Wanteds: %d",killername, WantedLevel[killerid]);
    SendClientMessage(i, TEAM_BLUE_COLOR, string);
    }
    }
    }
    }


    Und das GNE Gangfight System ist etwas zulang um das jetzt alles hier rein zu posten.


    Jeder hat hier nen geilen Text stehen außer mir ._. <3

  • Function OnPlayerDeath(playerid, killerid, reason)
    {
    M_OnPlayerDeath(playerid,killerid,reason);
    new name[MAX_PLAYER_NAME];
    new string[256];
    PlayerInfo[playerid][pInvWeapon] = 0;
    PlayerInfo[playerid][pInvAmmo] = 0;
    PlayerInfo[playerid][pInvWeapon2] = 0;
    PlayerInfo[playerid][pInvAmmo2] = 0;
    FrakMatsHolding[playerid] = 0;
    /*new playercash;
    new victimteam;
    new killerteam;*/
    if(PlayerInfo[playerid][pLevel] > 2 && KHSperre[playerid] == 0 && PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)
    {
    PlayerInfo[playerid][pTot] = 1;
    }
    for(new fs;fs<sizeof(FightSystem);fs++){
    if(FightSystem[fs][fsFightTime]){
    if(GetPlayerFaction(playerid) == FightSystem[fs][fsOwnerFaction]||
    GetPlayerFaction(playerid) == FightSystem[fs][fsAttackFaction]) {
    PlayerInfo[playerid][pTot] = 0;
    }
    }
    }
    if (!IsACop(killerid) && reason != 49 && PlayerInfo[killerid][pJailed] == 0 && !IstInGangFight(playerid))
    {
    SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord");
    }
    if (!IsACop(killerid) && reason == 49)
    {
    SetPlayerCriminal(killerid,255, "Fahrerflucht");
    }
    if(gPlayerUsingLoopingAnim[playerid])
    {
    gPlayerUsingLoopingAnim[playerid] = 0;
    TextDrawHideForPlayer(playerid,txtAnimHelper);
    }
    if(BlindFold[playerid] == 1)
    {
    BlindFold[playerid] = 0;
    }
    if(PlayerInfo[playerid][pMauled] == 1)
    {
    PlayerInfo[playerid][pMauled] = 0;
    }
    InCargo[playerid] = 0; InLevi[playerid] = 0; InEnfo[playerid] = 0;
    if(FirstSpawn[playerid] == 1)
    {
    FirstSpawn[playerid] = 0;
    }
    if(IsBlacklist[playerid]==1)
    {
    ClearBlack(playerid);
    IsBlacklist[playerid]=0;
    }
    //=======================
    //victimteam = gTeam[playerid];
    //killerteam = gTeam[killerid];
    gPlayerSpawned[playerid] = 0;
    GetPlayerName(playerid, name, sizeof(name));
    PlayerInfo[playerid][pLocal] = 255;
    if(killerid != 255)
    if(reason == 38)
    {
    new kstring[128];
    new kickname[MAX_PLAYER_NAME];
    if(IsPlayerConnected(killerid))
    {
    GetPlayerName(killerid, kickname, sizeof(kickname));
    format(string, 256, "Warnung: [%d]%s hat einen Spieler mit einer Minigun gekillt. ACHTUNG [CheatVerdacht].",killerid,kickname);
    ABroadCast(COLOR_YELLOW,string,1);
    printf("%s", kstring);
    }
    }
    if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
    {
    DisablePlayerCheckpoint(playerid);
    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
    }
    new caller = Mobile[playerid];
    if(caller != 255)
    {
    if(caller < 255)
    {
    SendClientMessage(caller, COLOR_GRAD2, " Die Verbindung wurde unterbrochen....");
    CellTime[caller] = 0;
    CellTime[playerid] = 0;
    Mobile[caller] = 255;
    }
    Mobile[playerid] = 255;
    CellTime[playerid] = 0;
    }
    ClearCrime(playerid);
    if(PlayerPaintballing[playerid] != 0)
    {
    PlayerPaintballKills[killerid] ++;
    if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
    {
    new killer[MAX_PLAYER_NAME];
    PaintballWinner = killerid;
    PaintballWinnerKills = PlayerPaintballKills[killerid];
    GetPlayerName(killerid, killer, sizeof(killer));
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerPaintballing[i] != 0)
    {
    format(string, sizeof(string), "* %s ist mit %d Kills in Führung.",killer,PaintballWinnerKills);
    SendClientMessage(i, COLOR_WHITE, string);
    }
    }
    }
    }
    return 1;
    }
    if(GettingCK[playerid] < 999 || OnCK[playerid] < 999)
    {
    if(IsPlayerConnected(killerid))
    {
    if(GettingCK[killerid] < 999 || OnCK[playerid] < 999)
    {
    new killer[MAX_PLAYER_NAME];
    new dier[MAX_PLAYER_NAME];
    GetPlayerName(playerid, dier, sizeof(dier));
    GetPlayerName(killerid, killer, sizeof(killer));
    format(string, sizeof(string), "* %s hat deinen Charakter gesperrt, du kannst nun mit diesem Charakter nicht mehr Spielen.",killer);
    SendClientMessage(playerid, COLOR_LIGHTRED, string);
    format(string, sizeof(string), "** %s hat den Spieler %s erledigt**",killer,dier);
    CKLog(string);
    PlayerInfo[playerid][pCK] = 1;
    if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
    else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
    if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
    else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
    KickPlayer[playerid] = 1;
    }
    }
    }
    if(PlayerInfo[playerid][pHeadValue] > 0)
    {
    if(IsPlayerConnected(killerid))
    {
    if(PlayerInfo[killerid][pMember] == 8 || PlayerInfo[killerid][pLeader] == 8)
    {
    ConsumingMoney[killerid] = 1;
    new killer[MAX_PLAYER_NAME];
    GetPlayerName(killerid, killer, sizeof(killer));
    GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
    //new fkasse = PlayerInfo[playerid][pHeadValue]/2;
    //FraktionsKasse[7] += fkasse;
    //GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]/2);
    format(string,128,"<< Hitman %s hat den Auftrag an %s erfüllt und bekommt: $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]/2);
    SendFamilyMessage(8, COLOR_YELLOW, string);
    PlayerInfo[playerid][pHeadValue] = 0;
    }
    }
    }
    if(IsPlayerConnected(killerid))
    {
    if(!IsACop(killerid))
    {
    WantedLevel[killerid] += 2;
    SetPlayerWantedLevel(killerid,2);
    SendClientMessage(killerid, COLOR_LIGHTRED, "Du hast ein Verbrechen begangen ( Mord ). Zeuge: Unbekannt.");
    new message[128];
    format(message, sizeof(message), "Vergebene Wanteds: 2. Neues Wantedlevel: %d", WantedLevel[killerid]);
    SendClientMessage(killerid, COLOR_YELLOW, message);
    new killername[MAX_PLAYER_NAME];
    GetPlayerName(killerid,killername,sizeof(killername));
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsACop(i))
    {
    SendClientMessage(i, TEAM_BLUE_COLOR, "HQ: Alle Einheiten: Reporter: Unbekannt, Vergebene Wanteds: 2");
    format(string, sizeof(string), "HQ: Verbrechen: Mord, Gesuchter: %s, Aktuelle Wanteds: %d",killername, WantedLevel[killerid]);
    SendClientMessage(i, TEAM_BLUE_COLOR, string);
    }
    }
    }
    }
    //GW_OnPlayerDeath(playerid, killerid, reason);
    killerid = INVALID_PLAYER_ID;
    SetPlayerColor(playerid,COLOR_GRAD2);
    return 1;
    }


    Jeder hat hier nen geilen Text stehen außer mir ._. <3

  • Lass es mal so laufen, und poste dann was im Server Log steht, wenn du kein Wanted bekommst.


    Spoiler anzeigen
    Function OnPlayerDeath(playerid, killerid, reason)
    {
    printf("OnPlayerDeath started: killerid = %d / playerid = %d / reason = %d", killerid, playerid, reason);
    M_OnPlayerDeath(playerid,killerid,reason);
    new name[MAX_PLAYER_NAME];
    new string[256];
    PlayerInfo[playerid][pInvWeapon] = 0;
    PlayerInfo[playerid][pInvAmmo] = 0;
    PlayerInfo[playerid][pInvWeapon2] = 0;
    PlayerInfo[playerid][pInvAmmo2] = 0;
    FrakMatsHolding[playerid] = 0;
    printf("Step 1");
    /*new playercash;
    new victimteam;
    new killerteam;*/
    if(PlayerInfo[playerid][pLevel] > 2 && KHSperre[playerid] == 0 && PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)
    {
    PlayerInfo[playerid][pTot] = 1;
    }
    for(new fs;fs<sizeof(FightSystem);fs++){
    if(FightSystem[fs][fsFightTime]){
    if(GetPlayerFaction(playerid) == FightSystem[fs][fsOwnerFaction]||
    GetPlayerFaction(playerid) == FightSystem[fs][fsAttackFaction]) {
    PlayerInfo[playerid][pTot] = 0;
    }
    }
    }
    if (!IsACop(killerid) && reason != 49 && PlayerInfo[killerid][pJailed] == 0 && !IstInGangFight(playerid))
    {
    SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord");
    }
    if (!IsACop(killerid) && reason == 49)
    {
    SetPlayerCriminal(killerid,255, "Fahrerflucht");
    }
    if(gPlayerUsingLoopingAnim[playerid])
    {
    gPlayerUsingLoopingAnim[playerid] = 0;
    TextDrawHideForPlayer(playerid,txtAnimHelper);
    }
    printf("Step 2");
    if(BlindFold[playerid] == 1)
    {
    BlindFold[playerid] = 0;
    }
    if(PlayerInfo[playerid][pMauled] == 1)
    {
    PlayerInfo[playerid][pMauled] = 0;
    }
    InCargo[playerid] = 0; InLevi[playerid] = 0; InEnfo[playerid] = 0;
    if(FirstSpawn[playerid] == 1)
    {
    FirstSpawn[playerid] = 0;
    }
    if(IsBlacklist[playerid]==1)
    {
    ClearBlack(playerid);
    IsBlacklist[playerid]=0;
    }
    printf("Step 3");
    //=======================
    //victimteam = gTeam[playerid];
    //killerteam = gTeam[killerid];
    gPlayerSpawned[playerid] = 0;
    GetPlayerName(playerid, name, sizeof(name));
    PlayerInfo[playerid][pLocal] = 255;
    if(killerid != 255)
    if(reason == 38)
    {
    new kstring[128];
    new kickname[MAX_PLAYER_NAME];
    if(IsPlayerConnected(killerid))
    {
    GetPlayerName(killerid, kickname, sizeof(kickname));
    format(string, 256, "Warnung: [%d]%s hat einen Spieler mit einer Minigun gekillt. ACHTUNG [CheatVerdacht].",killerid,kickname);
    ABroadCast(COLOR_YELLOW,string,1);
    printf("%s", kstring);
    }
    }
    if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
    {
    DisablePlayerCheckpoint(playerid);
    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
    }
    printf("Step 4");
    new caller = Mobile[playerid];
    if(caller != 255)
    {
    if(caller < 255)
    {
    SendClientMessage(caller, COLOR_GRAD2, " Die Verbindung wurde unterbrochen....");
    CellTime[caller] = 0;
    CellTime[playerid] = 0;
    Mobile[caller] = 255;
    }
    Mobile[playerid] = 255;
    CellTime[playerid] = 0;
    }
    printf("Step 5");
    ClearCrime(playerid);
    printf("Step 6");
    if(PlayerPaintballing[playerid] != 0)
    {
    PlayerPaintballKills[killerid] ++;
    if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
    {
    new killer[MAX_PLAYER_NAME];
    PaintballWinner = killerid;
    PaintballWinnerKills = PlayerPaintballKills[killerid];
    GetPlayerName(killerid, killer, sizeof(killer));
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerPaintballing[i] != 0)
    {
    format(string, sizeof(string), "* %s ist mit %d Kills in Führung.",killer,PaintballWinnerKills);
    SendClientMessage(i, COLOR_WHITE, string);
    }
    }
    }
    }
    return 1;
    }
    printf("Step 7");
    if(GettingCK[playerid] < 999 || OnCK[playerid] < 999)
    {
    if(IsPlayerConnected(killerid))
    {
    if(GettingCK[killerid] < 999 || OnCK[playerid] < 999)
    {
    new killer[MAX_PLAYER_NAME];
    new dier[MAX_PLAYER_NAME];
    GetPlayerName(playerid, dier, sizeof(dier));
    GetPlayerName(killerid, killer, sizeof(killer));
    format(string, sizeof(string), "* %s hat deinen Charakter gesperrt, du kannst nun mit diesem Charakter nicht mehr Spielen.",killer);
    SendClientMessage(playerid, COLOR_LIGHTRED, string);
    format(string, sizeof(string), "** %s hat den Spieler %s erledigt**",killer,dier);
    CKLog(string);
    PlayerInfo[playerid][pCK] = 1;
    if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
    else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
    if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
    else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
    KickPlayer[playerid] = 1;
    }
    }
    }
    printf("Step 8");
    if(PlayerInfo[playerid][pHeadValue] > 0)
    {
    if(IsPlayerConnected(killerid))
    {
    if(PlayerInfo[killerid][pMember] == 8 || PlayerInfo[killerid][pLeader] == 8)
    {
    ConsumingMoney[killerid] = 1;
    new killer[MAX_PLAYER_NAME];
    GetPlayerName(killerid, killer, sizeof(killer));
    GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
    //new fkasse = PlayerInfo[playerid][pHeadValue]/2;
    //FraktionsKasse[7] += fkasse;
    //GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]/2);
    format(string,128,"<< Hitman %s hat den Auftrag an %s erfüllt und bekommt: $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]/2);
    SendFamilyMessage(8, COLOR_YELLOW, string);
    PlayerInfo[playerid][pHeadValue] = 0;
    }
    }
    }
    printf("Step 9");
    if(IsPlayerConnected(killerid))
    {
    printf("Step 10");
    if(!IsACop(killerid))
    {
    printf("Step 11");
    WantedLevel[killerid] += 2;
    SetPlayerWantedLevel(killerid,2);
    SendClientMessage(killerid, COLOR_LIGHTRED, "Du hast ein Verbrechen begangen ( Mord ). Zeuge: Unbekannt.");
    new message[128];
    format(message, sizeof(message), "Vergebene Wanteds: 2. Neues Wantedlevel: %d", WantedLevel[killerid]);
    SendClientMessage(killerid, COLOR_YELLOW, message);
    new killername[MAX_PLAYER_NAME];
    GetPlayerName(killerid,killername,sizeof(killername));
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsACop(i))
    {
    SendClientMessage(i, TEAM_BLUE_COLOR, "HQ: Alle Einheiten: Reporter: Unbekannt, Vergebene Wanteds: 2");
    format(string, sizeof(string), "HQ: Verbrechen: Mord, Gesuchter: %s, Aktuelle Wanteds: %d",killername, WantedLevel[killerid]);
    SendClientMessage(i, TEAM_BLUE_COLOR, string);
    }
    }
    }
    }
    printf("Step 12");
    //GW_OnPlayerDeath(playerid, killerid, reason);
    killerid = INVALID_PLAYER_ID;
    SetPlayerColor(playerid,COLOR_GRAD2);
    printf("OnPlayerDeath Ende.");
    return 1;
    }

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Da hat die Abfrage auf "killerid != INVALID_PLAYERID" gefehlt.
    Jetzt sollte es klappen. Wenn ja, kannst die prints natürlich wieder entfernen, ansonsten Log nochmal posten.


    Code
    Function OnPlayerDeath(playerid, killerid, reason)
    {
    printf("OnPlayerDeath started: killerid = %d / playerid = %d / reason = %d", killerid, playerid, reason);
    M_OnPlayerDeath(playerid,killerid,reason);
    new name[MAX_PLAYER_NAME];
    new string[256];
    PlayerInfo[playerid][pInvWeapon] = 0;
    PlayerInfo[playerid][pInvAmmo] = 0;
    PlayerInfo[playerid][pInvWeapon2] = 0;
    PlayerInfo[playerid][pInvAmmo2] = 0;
    FrakMatsHolding[playerid] = 0;
    printf("Step 1");
    /*new playercash;
    new victimteam;
    new killerteam;*/
    if(PlayerInfo[playerid][pLevel] > 2 && KHSperre[playerid] == 0 && PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)
    {
    PlayerInfo[playerid][pTot] = 1;
    }
    for(new fs;fs<sizeof(FightSystem);fs++){
    if(FightSystem[fs][fsFightTime]){
    if(GetPlayerFaction(playerid) == FightSystem[fs][fsOwnerFaction]||
    GetPlayerFaction(playerid) == FightSystem[fs][fsAttackFaction]) {
    PlayerInfo[playerid][pTot] = 0;
    }
    }
    }
    if(killerid != INVALID_PLAYER_ID)
    {
    if (!IsACop(killerid) && reason != 49 && PlayerInfo[killerid][pJailed] == 0 && !IstInGangFight(playerid))
    {
    SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord");
    }
    if (!IsACop(killerid) && reason == 49)
    {
    SetPlayerCriminal(killerid,255, "Fahrerflucht");
    }
    }
    if(gPlayerUsingLoopingAnim[playerid])
    {
    gPlayerUsingLoopingAnim[playerid] = 0;
    TextDrawHideForPlayer(playerid,txtAnimHelper);
    }
    printf("Step 2");
    if(BlindFold[playerid] == 1)
    {
    BlindFold[playerid] = 0;
    }
    if(PlayerInfo[playerid][pMauled] == 1)
    {
    PlayerInfo[playerid][pMauled] = 0;
    }
    InCargo[playerid] = 0; InLevi[playerid] = 0; InEnfo[playerid] = 0;
    if(FirstSpawn[playerid] == 1)
    {
    FirstSpawn[playerid] = 0;
    }
    if(IsBlacklist[playerid]==1)
    {
    ClearBlack(playerid);
    IsBlacklist[playerid]=0;
    }
    printf("Step 3");
    //=======================
    //victimteam = gTeam[playerid];
    //killerteam = gTeam[killerid];
    gPlayerSpawned[playerid] = 0;
    GetPlayerName(playerid, name, sizeof(name));
    PlayerInfo[playerid][pLocal] = 255;
    if(killerid != INVALID_PLAYER_ID)
    {
    if(reason == 38)
    {
    new kstring[128];
    new kickname[MAX_PLAYER_NAME];
    if(IsPlayerConnected(killerid))
    {
    GetPlayerName(killerid, kickname, sizeof(kickname));
    format(string, 256, "Warnung: [%d]%s hat einen Spieler mit einer Minigun gekillt. ACHTUNG [CheatVerdacht].",killerid,kickname);
    ABroadCast(COLOR_YELLOW,string,1);
    printf("%s", kstring);
    }
    }
    }
    if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
    {
    DisablePlayerCheckpoint(playerid);
    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
    }
    printf("Step 4");
    new caller = Mobile[playerid];
    if(caller != 255)
    {
    if(caller < 255)
    {
    SendClientMessage(caller, COLOR_GRAD2, " Die Verbindung wurde unterbrochen....");
    CellTime[caller] = 0;
    CellTime[playerid] = 0;
    Mobile[caller] = 255;
    }
    Mobile[playerid] = 255;
    CellTime[playerid] = 0;
    }
    printf("Step 5");
    ClearCrime(playerid);
    printf("Step 6");
    if(killerid != INVALID_PLAYER_ID)
    {
    if(PlayerPaintballing[playerid] != 0)
    {
    PlayerPaintballKills[killerid] ++;
    if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
    {
    new killer[MAX_PLAYER_NAME];
    PaintballWinner = killerid;
    PaintballWinnerKills = PlayerPaintballKills[killerid];
    GetPlayerName(killerid, killer, sizeof(killer));
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerPaintballing[i] != 0)
    {
    format(string, sizeof(string), "* %s ist mit %d Kills in Führung.",killer,PaintballWinnerKills);
    SendClientMessage(i, COLOR_WHITE, string);
    }
    }
    }
    }
    return 1;
    }
    }
    printf("Step 7");
    if(GettingCK[playerid] < 999 || OnCK[playerid] < 999)
    {
    if(IsPlayerConnected(killerid))
    {
    if(GettingCK[killerid] < 999 || OnCK[playerid] < 999)
    {
    new killer[MAX_PLAYER_NAME];
    new dier[MAX_PLAYER_NAME];
    GetPlayerName(playerid, dier, sizeof(dier));
    GetPlayerName(killerid, killer, sizeof(killer));
    format(string, sizeof(string), "* %s hat deinen Charakter gesperrt, du kannst nun mit diesem Charakter nicht mehr Spielen.",killer);
    SendClientMessage(playerid, COLOR_LIGHTRED, string);
    format(string, sizeof(string), "** %s hat den Spieler %s erledigt**",killer,dier);
    CKLog(string);
    PlayerInfo[playerid][pCK] = 1;
    if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
    else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
    if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
    else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
    KickPlayer[playerid] = 1;
    }
    }
    }
    printf("Step 8");
    if(PlayerInfo[playerid][pHeadValue] > 0)
    {
    if(IsPlayerConnected(killerid))
    {
    if(PlayerInfo[killerid][pMember] == 8 || PlayerInfo[killerid][pLeader] == 8)
    {
    ConsumingMoney[killerid] = 1;
    new killer[MAX_PLAYER_NAME];
    GetPlayerName(killerid, killer, sizeof(killer));
    GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
    //new fkasse = PlayerInfo[playerid][pHeadValue]/2;
    //FraktionsKasse[7] += fkasse;
    //GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]/2);
    format(string,128,"<< Hitman %s hat den Auftrag an %s erfüllt und bekommt: $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]/2);
    SendFamilyMessage(8, COLOR_YELLOW, string);
    PlayerInfo[playerid][pHeadValue] = 0;
    }
    }
    }
    printf("Step 9");
    if(IsPlayerConnected(killerid))
    {
    printf("Step 10");
    if(!IsACop(killerid))
    {
    printf("Step 11");
    WantedLevel[killerid] += 2;
    SetPlayerWantedLevel(killerid,2);
    SendClientMessage(killerid, COLOR_LIGHTRED, "Du hast ein Verbrechen begangen ( Mord ). Zeuge: Unbekannt.");
    new message[128];
    format(message, sizeof(message), "Vergebene Wanteds: 2. Neues Wantedlevel: %d", WantedLevel[killerid]);
    SendClientMessage(killerid, COLOR_YELLOW, message);
    new killername[MAX_PLAYER_NAME];
    GetPlayerName(killerid,killername,sizeof(killername));
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsACop(i))
    {
    SendClientMessage(i, TEAM_BLUE_COLOR, "HQ: Alle Einheiten: Reporter: Unbekannt, Vergebene Wanteds: 2");
    format(string, sizeof(string), "HQ: Verbrechen: Mord, Gesuchter: %s, Aktuelle Wanteds: %d",killername, WantedLevel[killerid]);
    SendClientMessage(i, TEAM_BLUE_COLOR, string);
    }
    }
    }
    }
    printf("Step 12");
    //GW_OnPlayerDeath(playerid, killerid, reason);
    killerid = INVALID_PLAYER_ID;
    SetPlayerColor(playerid,COLOR_GRAD2);
    printf("OnPlayerDeath Ende.");
    return 1;
    }

    3HZXdYd.png

    Einmal editiert, zuletzt von Jeffry ()

  • Ok, dann liegt es an was anderem. Da müssen wir uns langsam annähern.
    Lass es so durchlaufen und poste den Log.

    Code
    Function OnPlayerDeath(playerid, killerid, reason)
    {
    printf("OnPlayerDeath started: killerid = %d / playerid = %d / reason = %d", killerid, playerid, reason);
    M_OnPlayerDeath(playerid,killerid,reason);
    new name[MAX_PLAYER_NAME];
    new string[256];
    PlayerInfo[playerid][pInvWeapon] = 0;
    PlayerInfo[playerid][pInvAmmo] = 0;
    PlayerInfo[playerid][pInvWeapon2] = 0;
    PlayerInfo[playerid][pInvAmmo2] = 0;
    FrakMatsHolding[playerid] = 0;
    printf("Step 1");
    /*new playercash;
    new victimteam;
    new killerteam;*/
    printf("Step 1.1");
    if(PlayerInfo[playerid][pLevel] > 2 && KHSperre[playerid] == 0 && PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)
    {
    printf("Step 1.2");
    PlayerInfo[playerid][pTot] = 1;
    }
    printf("Step 1.3");
    for(new fs;fs<sizeof(FightSystem);fs++){
    if(FightSystem[fs][fsFightTime]){
    if(GetPlayerFaction(playerid) == FightSystem[fs][fsOwnerFaction]||
    GetPlayerFaction(playerid) == FightSystem[fs][fsAttackFaction]) {
    PlayerInfo[playerid][pTot] = 0;
    }
    }
    }
    printf("Step 1.4");
    if(killerid != INVALID_PLAYER_ID)
    {
    printf("Step 1.5");
    if (!IsACop(killerid) && reason != 49 && PlayerInfo[killerid][pJailed] == 0 && !IstInGangFight(playerid))
    {
    printf("Step 1.5.2");
    SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord");
    }
    printf("Step 1.6");
    if (!IsACop(killerid) && reason == 49)
    {
    printf("Step 1.6.2");
    SetPlayerCriminal(killerid,255, "Fahrerflucht");
    }
    }
    printf("Step 1.7");
    if(gPlayerUsingLoopingAnim[playerid])
    {
    printf("Step 1.8");
    gPlayerUsingLoopingAnim[playerid] = 0;
    printf("Step 1.9");
    TextDrawHideForPlayer(playerid,txtAnimHelper);
    }
    printf("Step 2");
    if(BlindFold[playerid] == 1)
    {
    BlindFold[playerid] = 0;
    }
    if(PlayerInfo[playerid][pMauled] == 1)
    {
    PlayerInfo[playerid][pMauled] = 0;
    }
    InCargo[playerid] = 0; InLevi[playerid] = 0; InEnfo[playerid] = 0;
    if(FirstSpawn[playerid] == 1)
    {
    FirstSpawn[playerid] = 0;
    }
    if(IsBlacklist[playerid]==1)
    {
    ClearBlack(playerid);
    IsBlacklist[playerid]=0;
    }
    printf("Step 3");
    //=======================
    //victimteam = gTeam[playerid];
    //killerteam = gTeam[killerid];
    gPlayerSpawned[playerid] = 0;
    GetPlayerName(playerid, name, sizeof(name));
    PlayerInfo[playerid][pLocal] = 255;
    if(killerid != INVALID_PLAYER_ID)
    {
    if(reason == 38)
    {
    new kstring[128];
    new kickname[MAX_PLAYER_NAME];
    if(IsPlayerConnected(killerid))
    {
    GetPlayerName(killerid, kickname, sizeof(kickname));
    format(string, 256, "Warnung: [%d]%s hat einen Spieler mit einer Minigun gekillt. ACHTUNG [CheatVerdacht].",killerid,kickname);
    ABroadCast(COLOR_YELLOW,string,1);
    printf("%s", kstring);
    }
    }
    }
    if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
    {
    DisablePlayerCheckpoint(playerid);
    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
    }
    printf("Step 4");
    new caller = Mobile[playerid];
    if(caller != 255)
    {
    if(caller < 255)
    {
    SendClientMessage(caller, COLOR_GRAD2, " Die Verbindung wurde unterbrochen....");
    CellTime[caller] = 0;
    CellTime[playerid] = 0;
    Mobile[caller] = 255;
    }
    Mobile[playerid] = 255;
    CellTime[playerid] = 0;
    }
    printf("Step 5");
    ClearCrime(playerid);
    printf("Step 6");
    if(killerid != INVALID_PLAYER_ID)
    {
    if(PlayerPaintballing[playerid] != 0)
    {
    PlayerPaintballKills[killerid] ++;
    if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
    {
    new killer[MAX_PLAYER_NAME];
    PaintballWinner = killerid;
    PaintballWinnerKills = PlayerPaintballKills[killerid];
    GetPlayerName(killerid, killer, sizeof(killer));
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerPaintballing[i] != 0)
    {
    format(string, sizeof(string), "* %s ist mit %d Kills in Führung.",killer,PaintballWinnerKills);
    SendClientMessage(i, COLOR_WHITE, string);
    }
    }
    }
    }
    return 1;
    }
    }
    printf("Step 7");
    if(GettingCK[playerid] < 999 || OnCK[playerid] < 999)
    {
    if(IsPlayerConnected(killerid))
    {
    if(GettingCK[killerid] < 999 || OnCK[playerid] < 999)
    {
    new killer[MAX_PLAYER_NAME];
    new dier[MAX_PLAYER_NAME];
    GetPlayerName(playerid, dier, sizeof(dier));
    GetPlayerName(killerid, killer, sizeof(killer));
    format(string, sizeof(string), "* %s hat deinen Charakter gesperrt, du kannst nun mit diesem Charakter nicht mehr Spielen.",killer);
    SendClientMessage(playerid, COLOR_LIGHTRED, string);
    format(string, sizeof(string), "** %s hat den Spieler %s erledigt**",killer,dier);
    CKLog(string);
    PlayerInfo[playerid][pCK] = 1;
    if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
    else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
    if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
    else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
    KickPlayer[playerid] = 1;
    }
    }
    }
    printf("Step 8");
    if(PlayerInfo[playerid][pHeadValue] > 0)
    {
    if(IsPlayerConnected(killerid))
    {
    if(PlayerInfo[killerid][pMember] == 8 || PlayerInfo[killerid][pLeader] == 8)
    {
    ConsumingMoney[killerid] = 1;
    new killer[MAX_PLAYER_NAME];
    GetPlayerName(killerid, killer, sizeof(killer));
    GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
    //new fkasse = PlayerInfo[playerid][pHeadValue]/2;
    //FraktionsKasse[7] += fkasse;
    //GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]/2);
    format(string,128,"<< Hitman %s hat den Auftrag an %s erfüllt und bekommt: $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]/2);
    SendFamilyMessage(8, COLOR_YELLOW, string);
    PlayerInfo[playerid][pHeadValue] = 0;
    }
    }
    }
    printf("Step 9");
    if(IsPlayerConnected(killerid))
    {
    printf("Step 10");
    if(!IsACop(killerid))
    {
    printf("Step 11");
    WantedLevel[killerid] += 2;
    SetPlayerWantedLevel(killerid,2);
    SendClientMessage(killerid, COLOR_LIGHTRED, "Du hast ein Verbrechen begangen ( Mord ). Zeuge: Unbekannt.");
    new message[128];
    format(message, sizeof(message), "Vergebene Wanteds: 2. Neues Wantedlevel: %d", WantedLevel[killerid]);
    SendClientMessage(killerid, COLOR_YELLOW, message);
    new killername[MAX_PLAYER_NAME];
    GetPlayerName(killerid,killername,sizeof(killername));
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsACop(i))
    {
    SendClientMessage(i, TEAM_BLUE_COLOR, "HQ: Alle Einheiten: Reporter: Unbekannt, Vergebene Wanteds: 2");
    format(string, sizeof(string), "HQ: Verbrechen: Mord, Gesuchter: %s, Aktuelle Wanteds: %d",killername, WantedLevel[killerid]);
    SendClientMessage(i, TEAM_BLUE_COLOR, string);
    }
    }
    }
    }
    printf("Step 12");
    //GW_OnPlayerDeath(playerid, killerid, reason);
    killerid = INVALID_PLAYER_ID;
    SetPlayerColor(playerid,COLOR_GRAD2);
    printf("OnPlayerDeath Ende.");
    return 1;
    }


    Falls es nach 1.3 endet, poste bitte die GetPlayerFaction Funktion, oder du debuggst es nach dem Schema wie ich es hier mache, dann kannst es selbst machen bis du die Zeile hast an der es endet.

  • Function IsACop(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    new leader = PlayerInfo[playerid][pLeader];
    new member = PlayerInfo[playerid][pMember];
    if(member==1 || member==2 || member==22 || member==3)
    {
    return 1;
    }
    else if(leader==1 || leader==2 || leader==22 || leader==3)
    {
    return 1;
    }
    }
    return 0;
    }


    Function IstInGangFight(playerid)
    {
    new TempZone = GetPlayerFightzone(playerid);
    if(TempZone != -255){ // In Zone
    if(FightSystem[TempZone][fsFightTime] && FightSystem[TempZone][fsAttackFaction] != -255){ // Wenn Gegner nicht gleich -255 ist
    return 1;
    }
    }
    return 1;
    }


    Jeder hat hier nen geilen Text stehen außer mir ._. <3

  • stock GetPlayerFightzone(playerid)
    {
    new Float:GangZone[3];
    GetPlayerPos(playerid,GangZone[0],GangZone[1],GangZone[2]);
    for(new fs;fs<sizeof(FightSystem);fs++)
    {
    if((GangZone[0] >= FightSystem[fs][fsMinX] && GangZone[0] <= FightSystem[fs][fsMaxX]) && (GangZone[1] >= FightSystem[fs][fsMinY] && GangZone[1] <= FightSystem[fs][fsMaxY]) && GangZone[2] <= 500)
    return fs;
    }
    return -14;
    }



    Hier.


    Jeder hat hier nen geilen Text stehen außer mir ._. <3

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen