Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new string[256];
- if(killerid != INVALID_PLAYER_ID)
- {
- if(IsPlayerInFraktion(killerid, 18))
- {
- if(PlayerInfo[playerid][pContract] > 0)
- {
- GameTextForPlayer(killerid, "~w~Auftragmord ~g~ausgefuehrt", 3000, 1);
- format(string, sizeof(string), "%s hat den Auftragsmord auf %s für $%d erfolgreich ausgeführt.", GetName(killerid), GetName(playerid), PlayerInfo[playerid][pContract]);
- SendRadioMessage(18, COLOR_LIGHTBLUE, string);
- GameTextForPlayer(playerid, "~r~Auftragsmord", 3000, 1);
- SafeGivePlayerMoney(killerid, PlayerInfo[playerid][pContract]);
- OnContractChange(playerid, PlayerInfo[playerid][pContract], 0);
- PlayerInfo[playerid][pContract] = 0;
- PlayerInfo[killerid][pContractCount] ++;
- for(new i=0;i<MAX_CTLABEL;i++){
- if(PlayerInfo[killerid][pCTLabelCreated][i] == 1 && PlayerInfo[killerid][pCTLabelID][i] == playerid){
- DestroyDynamic3DTextLabel(PlayerInfo[killerid][pCTLabel][i]);
- PlayerInfo[killerid][pCTLabelID][i] = INVALID_PLAYER_ID;
- PlayerInfo[killerid][pCTLabelCreated][i] = 0;
- }
- }
- }
- }
- }
- if(!(IsPlayerInFraktion(playerid, 3) || IsPlayerInFraktion(playerid, 5) || IsPlayerInFraktion(playerid, 9) && PlayerInfo[killerid][pWantedLevel] <=500))
- {
- if(pIsRobbingBank[playerid] == 1)
- {
- format(string, sizeof(string), "%s hat den Bankräuber %s getötet.", GetName(killerid), GetName(playerid));
- SendClientMessageToAll(COLOR_LIGHTBLUE, string);
- }
- format(string, sizeof(string), "HQ: %s (ID: %d) hat ein Verbrechen begangen: Mord, over.", GetName(killerid), killerid);
- SendRadioMessage(1, COLOR_BLUE, string);
- format(string, sizeof(string), "HQ: Reporter: %s, Aktuelles Wantedlevel: %d, over.", GetName(killerid), PlayerInfo[killerid][pWantedLevel]); //18814
- SendRadioMessage(1, COLOR_BLUE, string);
- SendRadioMessage(1, COLOR_BLUE, string);
- format(string, sizeof(string), "HQ: %s (ID: %d) hat ein Verbrechen begangen: Mord, over.", GetName(killerid), killerid);
- SendRadioMessage(2, COLOR_BLUE, string);
- format(string, sizeof(string), "HQ: Reporter: %s, Aktuelles Wantedlevel: %d, over.", GetName(killerid), PlayerInfo[killerid][pWantedLevel]);
- SendRadioMessage(2, COLOR_BLUE, string);
- format(string, sizeof(string), "HQ: %s (ID: %d) hat ein Verbrechen begangen: Mord, over.", GetName(killerid), killerid);
- SendRadioMessage(3, COLOR_BLUE, string);
- format(string, sizeof(string), "HQ: Reporter: %s, Aktuelles Wantedlevel: %d, over.", GetName(killerid), PlayerInfo[killerid][pWantedLevel]);
- SendRadioMessage(3, COLOR_BLUE, string);
- }
- if(Spectate[playerid] == 9999)
- {
- if(killerid != INVALID_PLAYER_ID)
- {
- new pString[512];
- format(pString, sizeof(pString), "[DEATH] %s wurde von %s getötet. Reason: %i", PlayerInfo[playerid][pName], PlayerInfo[killerid][pName], reason);
- Spielerprotokoll(playerid, 5, pString);
- format(pString, sizeof(pString), "[KILL] %s hat %s getötet. Reason: %i", PlayerInfo[killerid][pName], PlayerInfo[playerid][pName], reason);
- Spielerprotokoll(killerid, 5, pString);
- }
- else
- {
- new pString[512];
- format(pString, sizeof(pString), "[DEATH] %s wurde vom Server getötet. Reason: %i", PlayerInfo[playerid][pName], reason);
- Spielerprotokoll(playerid, 5, pString);
- }
- ACSInfo[playerid][HealPaused] = 5;
- ACSInfo[playerid][WaffenCooldown] = 5;
- if(PlayerInfo[playerid][pEisen] > 0)
- {
- SendStrukturMessage(playerid, MSG_INFO, "Da du gestorben bist, verlierst du dein Eisen!");
- PlayerInfo[playerid][pEisen] = 0;
- }
- if(PlayerInfo[playerid][pMaterials] > 0)
- {
- SendStrukturMessage(playerid, MSG_INFO, "Da du gestorben bist, verlierst du deine Materials!");
- PlayerInfo[playerid][pMaterials] = 0;
- }
- ResetPlayerWeapons(playerid);
- SetPlayerHealth(playerid, 99.0);
- SetPlayerArmour(playerid, 0.0);
- ACSInfo[playerid][FahrzeugEnterTime] += 221;
- DeathsPerSecond[playerid] ++;
- new newnamekiller[24], newnameplayer[24];
- if(IsPlayerInPaintballArena[playerid] == 1)
- {
- PlayerInfo[playerid][pTodStatus] = 4;
- return 1;
- }
- if(killerid != INVALID_PLAYER_ID && IsPlayerConnectedEx(killerid)) PlayerInfo[killerid][pMorde] += 1;
- GetPlayerPos(playerid, PlayerInfo[playerid][pTodX], PlayerInfo[playerid][pTodY], PlayerInfo[playerid][pTodZ]);
- GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pTodR]);
- PlayerInfo[playerid][pTode] += 1;
- UpdatePlayerAccount(playerid, UPDATE_WAFFEN);
- for(new idx = 1; idx < sizeof(GangwarInfo); idx++)
- {
- if(GangwarInfo[idx][gwStatus] == 1)
- {
- if(IsPlayerInArea(playerid, GangwarInfo[idx][gwMinX], GangwarInfo[idx][gwMinY], GangwarInfo[idx][gwMaxX], GangwarInfo[idx][gwMaxY]))
- {
- strmid(newnameplayer, PlayerInfo[playerid][pName], 0, strlen(PlayerInfo[playerid][pName]), 255);
- if(PlayerInfo[playerid][pAdmin] > 1) strdel(newnameplayer, 0, 4);
- strmid(newnamekiller, PlayerInfo[killerid][pName], 0, strlen(PlayerInfo[killerid][pName]), 255);
- if(PlayerInfo[killerid][pAdmin] > 1) strdel(newnamekiller, 0, 4);
- if(IsPlayerInFraktion(playerid, GangwarInfo[idx][gwFrakID]))
- {
- GangwarInfo[idx][gwAngreiferP] += 1;
- format(string, sizeof(string), "~r~%s ~w~t¨tete ~r~%s", newnamekiller, newnameplayer);
- TextDrawSetString(GangwarTextDrawNews[idx], string);
- PlayerInfo[playerid][pTodStatus] = 2;
- GangwarEinnehmZeit[playerid] = 0;
- KillTimer(GangwarEinnehmTimer[playerid]);
- GangwarFlageAktualisieren(idx, 1);
- GangwarFlageAktualisieren(idx, 2);
- GangwarFlageAktualisieren(idx, 3);
- GangwarInfo[idx][gwTodeBesitzer] ++;
- if(killerid != INVALID_PLAYER_ID && IsPlayerInFraktion(killerid, GangwarInfo[idx][gwAngreifer])) GangwarInfo[idx][gwMordeAngreifer] ++;
- return 1;
- }
- if(IsPlayerInFraktion(playerid, GangwarInfo[idx][gwAngreifer]))
- {
- GangwarInfo[idx][gBesitzerP] += 1;
- format(string, sizeof(string), "~r~%s ~w~t¨tete ~r~%s", newnamekiller, newnameplayer);
- TextDrawSetString(GangwarTextDrawNews[idx], string);
- PlayerInfo[playerid][pTodStatus] = 2;
- GangwarEinnehmZeit[playerid] = 0;
- KillTimer(GangwarEinnehmTimer[playerid]);
- GangwarFlageAktualisieren(idx, 1);
- GangwarFlageAktualisieren(idx, 2);
- GangwarFlageAktualisieren(idx, 3);
- GangwarInfo[idx][gwTodeAngreifer] ++;
- if(killerid != INVALID_PLAYER_ID && IsPlayerInFraktion(killerid, GangwarInfo[idx][gwFrakID])) GangwarInfo[idx][gwMordeBesitzer] ++;
- return 1;
- }
- }
- }
- }
- if(killerid != INVALID_PLAYER_ID && (IsACop(killerid) && PlayerInfo[killerid][pDienst] == 0 || !IsACop(killerid)))
- {
- PlayerInfo[killerid][pWantedLevel] += 2;
- AktualisiereSpielerWanteds(killerid);
- format(string, sizeof(string), "Du hast ein Verbrechen begangen. (Mord) Reporter: %s", "Unbekannt");
- SendClientMessage(killerid, COLOR_RED, string);
- format(string, sizeof(string), "Dein aktuelles Wanted Level: %d", PlayerInfo[killerid][pWantedLevel]);
- SendClientMessage(killerid, COLOR_YELLOW, string);
- }
- if(IsPlayerInTheoriePrufung[playerid] == 1)
- {
- TUVTheoriePlatze[TUVTheoriePlatz[playerid]] = 0;
- SetDynamicObjectMaterialText(TUVPC[TUVTheoriePlatz[playerid]], 2, "TÜV SA", 130, "Arial", 125, 1, -16776961, -1, 1);
- IsPlayerInTheoriePrufung[playerid] = 0;
- }
- StopAudioStreamForPlayer(playerid);
- if(GetPVarInt(playerid, "roped") == 1)
- {
- for(new destr2 = 0; destr2 <= ropelength; destr2 ++) DestroyDynamicObject(r0pes[playerid][destr2]), r0pes[playerid][destr2] = NO_OBJECT;
- SetPVarInt(playerid, "roped", 0);
- DisablePlayerCheckpoint(playerid);
- }
- if(PlayerInfo[playerid][pGecufft] == 1)
- {
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
- RemovePlayerAttachedObject(playerid, CUFFOBJECT_SLOT);
- PlayerInfo[playerid][pGecufft] = 0;
- }
- new deathstring[110], deathreason[30];
- if(killerid != INVALID_PLAYER_ID)
- {
- switch(reason)
- {
- case 0: deathreason = "Faust";
- case 16,35,36,40,51: deathreason = "Explosion";
- case 18,37: deathreason = "Feuer";
- case 49: deathreason = "Fahrzeug";
- case 50: deathreason = "Rotor";
- default: GetWaffenName(reason, deathreason, sizeof(deathreason));
- }
- format(deathstring, sizeof(deathstring), "Info: %s (%i) wurde getötet von %s (%i) - %s", PlayerInfo[playerid][pName], playerid, PlayerInfo[killerid][pName], killerid, deathreason);
- }
- else
- {
- switch(reason)
- {
- case 51: deathreason = "Explosion";
- case 53: deathreason = "Drowned";
- case 54: deathreason = "Runtergefallen";
- default: deathreason = "Tot";
- }
- format(deathstring, sizeof(deathstring), "Info: %s (%i) wurde vom Server getötet. (%s)", PlayerInfo[playerid][pName], playerid, deathreason);
- }
- SendAdminMessage(3, COLOR_GREEN, deathstring);
- if(PlayerInfo[playerid][pWantedLevel] >= 1)
- {
- if(killerid != INVALID_PLAYER_ID && IsPlayerConnected(killerid))
- {
- if(IsACop(killerid) && PlayerInfo[killerid][pDienst] == 1)
- {
- new zeit = PlayerInfo[playerid][pWantedLevel]*45;
- PlayerInfo[playerid][pKnastZeit] = zeit;
- PlayerInfo[playerid][pKnastAFKZeit] = zeit/2;
- if(PlayerInfo[playerid][pWantedLevel] < 60) PlayerInfo[playerid][pKnast] = 1;
- else PlayerInfo[playerid][pKnast] = 3;
- new strafe = PlayerInfo[playerid][pWantedLevel]*65;
- if(PlayerInfo[playerid][pGiroKonto] == 1)
- {
- PlayerInfo[playerid][pGirokontoStand] -= 1999;
- KontoauszugLog(PlayerInfo[playerid][pSaveID], "-", "Gefängnis Strafe", 1999, PlayerInfo[playerid][pGirokontoStand]);
- }
- else SafeGivePlayerMoney(playerid, 1999);
- new kassenpreis = strafe/2;
- FrakInfo[1][fGeld] += kassenpreis;
- FrakInfo[3][fGeld] += kassenpreis;
- new loginfo[50];
- format(loginfo, sizeof(loginfo), "Gesuchten %s umgebracht", PlayerInfo[playerid][pName]);
- FrakInfoLog(1, "Geld", PlayerInfo[killerid][pName], "+", loginfo, kassenpreis, FrakInfo[1][fGeld]);
- FrakInfoLog(3, "Geld", PlayerInfo[killerid][pName], "+", loginfo, kassenpreis, FrakInfo[3][fGeld]);
- PlayerInfo[playerid][pWantedLevel] = 0;
- PlayerInfo[playerid][pKnastAufenthalte] += 1;
- GameTextForPlayer(killerid, "~w~Gesuchten~n~~r~umgebracht!", 2000, 1);
- format(string, sizeof(string), "[HQ] Alle Einheiten: %s hat den Gesuchten %s umgebracht!", PlayerInfo[killerid][pName], PlayerInfo[playerid][pName]);
- SendRadioMessage(1, COLOR_BLUE, string);
- SendRadioMessage(3, COLOR_BLUE, string);
- PlayerInfo[playerid][pTodStatus] = 3;
- AktualisiereSpielerWanteds(playerid);
- AktualisiereSpielerLabel(playerid);
- OnPlayerFriedhof(playerid);
- return 1;
- }
- }
- }
- if(PlayerResetInfo[playerid][prShootByCop] != 0)
- {
- new copkiller = IsAAktivCopInNear(playerid);
- if(copkiller != INVALID_PLAYER_ID)
- {
- new zeit = PlayerInfo[playerid][pWantedLevel]*45;
- PlayerInfo[playerid][pKnastZeit] = zeit;
- PlayerInfo[playerid][pKnastAFKZeit] = zeit/2;
- if(PlayerInfo[playerid][pWantedLevel] < 60) PlayerInfo[playerid][pKnast] = 1;
- else PlayerInfo[playerid][pKnast] = 3;
- new strafe = PlayerInfo[playerid][pWantedLevel]*65;
- if(PlayerInfo[playerid][pGiroKonto] == 1)
- {
- PlayerInfo[playerid][pGirokontoStand] -= 1999;
- KontoauszugLog(PlayerInfo[playerid][pSaveID], "-", "Gefängnis Strafe", 1999, PlayerInfo[playerid][pGirokontoStand]);
- }
- else SafeGivePlayerMoney(playerid, 1999);
- new kassenpreis = strafe/2;
- FrakInfo[1][fGeld] += kassenpreis;
- FrakInfo[3][fGeld] += kassenpreis;
- new loginfo[50];
- format(loginfo, sizeof(loginfo), "Gesuchten %s umgebracht", PlayerInfo[playerid][pName]);
- FrakInfoLog(1, "Geld", PlayerInfo[copkiller][pName], "+", loginfo, kassenpreis, FrakInfo[1][fGeld]);
- FrakInfoLog(3, "Geld", PlayerInfo[copkiller][pName], "+", loginfo, kassenpreis, FrakInfo[3][fGeld]);
- PlayerInfo[playerid][pWantedLevel] = 0;
- PlayerInfo[playerid][pKnastAufenthalte] += 1;
- GameTextForPlayer(killerid, "~w~Gesuchten~n~~r~umgebracht!", 2000, 1);
- format(string, sizeof(string), "[HQ] Alle Einheiten: %s war in der Nähe des gesuchten %s, als er gestorben ist", PlayerInfo[copkiller][pName], PlayerInfo[playerid][pName]);
- SendRadioMessage(1, COLOR_BLUE, string);
- SendRadioMessage(3, COLOR_BLUE, string);
- PlayerInfo[playerid][pTodStatus] = 3;
- AktualisiereSpielerWanteds(playerid);
- AktualisiereSpielerLabel(playerid);
- OnPlayerFriedhof(playerid);
- return 1;
- }
- }
- TodesGrund[playerid] = reason;
- PlayerInfo[playerid][pTodStatus] = 1;
- if(killerid != INVALID_PLAYER_ID && PlayerInfo[playerid][pBlacklist][GetPlayerFraktion(killerid)] == 1)
- {
- PlayerInfo[playerid][pTodZeit] = 240; // 4 Minuten
- SendFormatMessage(playerid, COLOR_ORANGE, "Ein Mitglied der %s hat dich getötet. Da du auf der Blacklist der Fraktion stehst, bist du für 10 Minuten auf dem Friedhof!", FrakInfo[GetPlayerFraktion(killerid)][fLongName]);
- SendFormatMessage(playerid, COLOR_ORANGE, "Du kannst im Forumbereich der Fraktion einen Freikaufantrag schreiben!");
- }
- else PlayerInfo[playerid][pTodZeit] = 120; // 5 Minuten
- OnPlayerFriedhof(playerid);
- new interior = GetPlayerInterior(playerid);
- new vw = GetPlayerVirtualWorld(playerid);
- if(TodIcon[playerid] == 0) TodIcon[playerid] = CreateDynamicPickup(1254, 1, PlayerInfo[playerid][pTodX], PlayerInfo[playerid][pTodY], PlayerInfo[playerid][pTodZ], vw, interior);
- if(PlayerInfo[playerid][pLevel] < 2) SendClientMessage(playerid, COLOR_WHITE, "Du kannst bis zum Respawn nur den Befehl /report benutzen!");
- PlayerInfo[playerid][pDienst] = 0;
- AktualisiereSpielerLabel(playerid);
- UpdatePlayerAccount(playerid, UPDATE_WAFFEN);
- UpdatePlayerDamageStatus(playerid);
- //SavePlayer(playerid);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment