Code
if(victimteam >= 4)
{
if(IsPlayerConnected(killerid))
{
new slice = 100; //$100
playercash = GetPlayerMoney(playerid);
if(gTeam[killerid] != 2 && PlayerInfo[killerid][pMember] != 7) { WantedPoints[killerid] += 0; } //+ 2 wanted points
if(SafeTime[playerid] <= 0)
{
if(gTeam[killerid] != gTeam[playerid])
{
if(GetPlayerState(killerid) == 1)
{
PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] +1;
}
else
{
PlayerInfo[killerid][pKills]++;
}
}
}
if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || (gTeam[killerid] == gTeam[playerid] && gTeam[playerid] != 4))
{
slice = 0;
}
if (((gTeam[killerid]) != 4) && ((gTeam[killerid]) == gTeam[playerid]))//no team kill
{
slice = 0;
}
if (playercash > 0)
{
GivePlayerMoney(playerid, -slice);
}
else
{
slice = slice+500;
}
GivePlayerMoney(killerid, slice);
PlayerInfo[playerid][pCrimes] += 1;
PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
if (((gTeam[killerid]) == 3) && reason != 49)
{
SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord");
}
else if (((gTeam[killerid]) == 3) && reason == 49)
{
SetPlayerCriminal(killerid,255, "Fahrerflucht");
}
}
}
else if (victimteam == 2)
{
if(IsPlayerConnected(killerid))
{
// Cop kill
if (gTeam[killerid] == 2)//cops kill cop
{
PlayerInfo[playerid][pCrimes] += 1;
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoney(killerid, -suecost);
GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
}
if (gTeam[killerid] >= 3)
{
if(reason != 49)
{
SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord");
}
else if (reason == 49)
{
SetPlayerCriminal(killerid,255, "Fahrerflucht");
}
}
if(gTeam[killerid] >= 5 && SafeTime[playerid] <= 0)
{
if(GetPlayerState(killerid) == 1)
{
PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills]+1;
}
else
{
PlayerInfo[killerid][pKills]++;
}
}
}
}
else if (victimteam == 3)
{
if(IsPlayerConnected(killerid))
{
// Civ kill
if ((gTeam[killerid]) == 2 || PlayerInfo[killerid][pMember] == 7)//cops kill civ
{
if(WantedLevel[playerid] < 1)
{
PlayerInfo[playerid][pCrimes] += 1;
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoney(killerid, -suecost);
GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
}
}
else
{
WantedPoints[killerid] += 0;
}
if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason != 49)
{
SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord");
}
else if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason == 49)
{
SetPlayerCriminal(killerid,255, "Fahrerflucht");
}
}
}
else if (victimteam == 1)
{
if(IsPlayerConnected(killerid))
{
// Civ kill
if ((gTeam[killerid]) == 2)//cops kill civ
{
PlayerInfo[playerid][pCrimes] += 1;
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoney(killerid, -suecost);
GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
}
else if ((gTeam[killerid]) == 1)//med kill civ
{
PlayerInfo[playerid][pCrimes] += 1;
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoney(killerid, -suecost);
GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
}
if (((gTeam[killerid]) == 4) && reason != 49)
{
SetPlayerCriminal(killerid,255, "Vorsätzlicher Mord");
}
else if (((gTeam[killerid]) == 3) && reason == 49)
{
SetPlayerCriminal(killerid,255, "Fahrerflucht");
}
}
}
if (victimteam >= 3 && WantedPoints[playerid] > 0 && killerteam == 2)
{
SetPlayerFree(playerid,killerid, "Gekillt");
}
killerid = INVALID_PLAYER_ID;
SetPlayerColor(playerid,COLOR_GRAD2);
Alles anzeigen
Das ist momentan so bei mir bei OnPlayerDeath...Wie schaff ich das, dass wenn, egal wer (sei diese Person in einer Staatsfraktion, Gang oder Mafia egal), jemand jemanden killt, man ein Mord und Verbrechen dazu bekommt...Wenn man mit jemanden mit Waffen oder der Faust tötet soll "Vorstäzlicher Mord" kommen und bei Morden mit Fahrzeugen soll "Fahrerflucht" kommen.