Auto Wanteds

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
  • Hey,
    Ich möchte das wenn ein Spieler einen Polizisten tötet 7WTDs und bei einem Zivilisten/Gang ler 5WTDs
    Das habe ich so



    Function OnPlayerDeath(playerid, killerid, reason)
    else if(IsACop(playerid))
    {
    if(IsPlayerConnected(killerid))
    {
    PlayerInfo[playerid][pKills]++;
    if(IsACop(playerid))//Polizist Tötet Polizist
    {
    PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
    GivePlayerMoney(killerid, -suecost);
    GivePlayerMoney(playerid, suecost+100);
    }
    else if(IsANichtCop(killerid))
    {
    WantedPoints[killerid] += 7;
    if(reason != 49)
    {
    CopMord[playerid] = 1;
    SetPlayerCriminal(killerid,225,"Polizei Mord");
    }
    else if (reason == 49)
    {
    CopMord[playerid] = 1;
    SetPlayerCriminal(killerid,225,"Fahrerflucht");
    }
    }
    }
    }
    else if(IsANichtCop(killerid))
    {
    if(IsPlayerConnected(playerid))
    {
    PlayerInfo[playerid][pKills]++;
    WantedPoints[killerid] += 5;
    if(reason != 49)
    {
    CopMord[playerid] = 0;
    SetPlayerCriminal(killerid,225,"Zivilisten Mord");
    }
    else if (reason == 49)
    {
    CopMord[playerid] = 0;
    SetPlayerCriminal(killerid,225,"Fahrerflucht");
    }
    }
    }
    }


    Function SetPlayerCriminal(playerid,declare,reason[])
    {
    if(IsPlayerConnected(playerid))
    {
    PlayerInfo[playerid][pCrimes] += 1;
    new turned[MAX_PLAYER_NAME];
    new turner[MAX_PLAYER_NAME];
    new turnmes[128];
    new wantedmes[128];
    new wlevel;
    strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
    GetPlayerName(playerid, turned, sizeof(turned));
    if (declare == 255)
    {
    format(turner, sizeof(turner), "Unbekannt");
    strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
    }
    else
    {
    if(IsPlayerConnected(declare))
    {
    GetPlayerName(declare, turner, sizeof(turner));
    strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
    strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255);
    strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255);
    }
    }
    if(CopMord[playerid] == 1)
    {
    CopMord[playerid] = 0;
    WantedLevel[playerid]+=7;
    }
    else
    {
    CopMord[playerid] = 0;
    WantedLevel[playerid]+=5;
    }
    wlevel = WantedLevel[playerid];
    format(turnmes, sizeof(turnmes), "Du hast ein Verbrechen begangen ( %s ). Zeuge: %s.",reason,turner);
    SendClientMessage(playerid, COLOR_LIGHTRED, turnmes);
    format(wantedmes, sizeof(wantedmes), "Momentanes Wantedlevel: %d", wlevel);
    SendClientMessage(playerid, COLOR_YELLOW, wantedmes);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(IsACop(i))
    {
    format(cbjstore, sizeof(turnmes), "HQ: Alle Einheiten: Zeuge: %s",turner);
    SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
    format(cbjstore, sizeof(turnmes), "HQ: Verbrechen: %s, Gesuchter: %s",reason,turned);
    SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
    }
    }
    }
    }
    }


    Danke im Vorraus


  • Function OnPlayerDeath(playerid, killerid, reason)
    else if(IsACop(playerid))
    {
    if(IsPlayerConnected(killerid))
    {
    PlayerInfo[playerid][pKills]++;
    if(IsACop(playerid))//Polizist Tötet Polizist
    {
    PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
    GivePlayerMoney(killerid, -suecost);
    GivePlayerMoney(playerid, suecost+100);
    }
    else if(IsANichtCop(killerid))
    {
    if(reason != 49)
    {
    CopMord[playerid] = 1;
    SetPlayerCriminal(killerid,225,"Polizei Mord");
    SetPlayerWantedLevel(killerid, +7);
    }
    else if (reason == 49)
    {
    CopMord[playerid] = 1;
    SetPlayerCriminal(killerid,225,"Fahrerflucht");
    SetPlayerWantedLevel(killerid, +1);
    }
    }
    }
    }
    else if(IsANichtCop(killerid))
    {
    if(IsPlayerConnected(playerid))
    {
    if(reason != 49)
    {
    CopMord[playerid] = 0;
    SetPlayerCriminal(killerid,225,"Zivilisten Mord");
    }
    else if (reason == 49)
    {
    CopMord[playerid] = 0;
    SetPlayerCriminal(killerid,225,"Fahrerflucht");
    }
    SetPlayerWantedLevel(killerid, +5);
    }
    }
    }


    so inetwa?

    graphics frontend web

  • Function OnPlayerDeath(playerid, killerid, reason)
    else if(IsACop(playerid))
    {
    if(IsPlayerConnected(killerid))
    {
    PlayerInfo[playerid][pKills]++;
    if(IsACop(playerid))//hier muss Killerid hin
    {
    PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
    GivePlayerMoney(killerid, -suecost);
    GivePlayerMoney(playerid, suecost+100);
    }
    else if(IsANichtCop(killerid))
    {
    WantedPoints[killerid] += 7;
    if(reason != 49)
    {
    CopMord[playerid] = 1;
    SetPlayerCriminal(killerid,225,"Polizei Mord");
    }
    else if (reason == 49)
    {
    CopMord[playerid] = 1;
    SetPlayerCriminal(killerid,225,"Fahrerflucht");
    }
    }
    }
    }
    else if(IsANichtCop(killerid))
    {
    if(IsPlayerConnected(playerid))
    {
    PlayerInfo[playerid][pKills]++;
    WantedPoints[killerid] += 5;
    if(reason != 49)
    {
    CopMord[playerid] = 0;
    SetPlayerCriminal(killerid,225,"Zivilisten Mord");
    }
    else if (reason == 49)
    {
    CopMord[playerid] = 0;
    SetPlayerCriminal(killerid,225,"Fahrerflucht");
    }
    }
    }
    }