public OnPlayerDeath(playerid, killerid, reason)
{
if(IsInBus[playerid] == 1)
{
IsInBus[playerid] = 0;
KillTimer(Timer1[playerid]);
KillTimer(Timer2[playerid]);
}
KaufTicket[playerid] = 0;
(FLUG_TIMER_RECENT = 0);
KillTimer(timer1);
KillTimer(timer2);
KillTimer(timer3);
KillTimer(timer4);
StopAudioStreamForPlayer(playerid);
TogglePlayerControllable(playerid,1);
FLUG_TIMER_RECENT =0;
(FLUG_TIMER_RECENT = 0);
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw8);
TextDrawHideForPlayer(playerid, Textdraw9);
TextDrawHideForPlayer(playerid, Textdraw10);
TextDrawHideForPlayer(playerid, Textdraw11);
TextDrawHideForPlayer(playerid, Textdraw12);
TextDrawHideForPlayer(playerid, Textdraw13);
TextDrawHideForPlayer(playerid, Textdraw14);
TextDrawHideForPlayer(playerid, Textdraw15);
SpielerInfo[playerid][pTot] = 1;
ResetPlayerWeaponStats(playerid);
if(M_IsPlayerInZone(playerid,NODMBSN) || M_IsPlayerInZone(playerid,NODMNEWB) || M_IsPlayerInZone(playerid,NODMSH)) {
if(killerid != INVALID_PLAYER_ID) {
if(!IsACop(killerid)) {
new string[128];
format(string, sizeof(string), "%s wurde vom System für 12 Stunden Zeitgebannt, Grund: DM in NoDM-Zone", GetName(killerid));
SCMTA(COLOR_LIGHTRED, string);
new zeitdauer=gettime()+12*60*60;
new query[256];
format(query,sizeof(query),"UPDATE `accounts` SET `tban`='%i' WHERE `name`='%s'",zeitdauer,GetName(killerid));
mysql_query(query);
KickEx(killerid);
}
}
}
if(reason == 49) {
if(killerid != INVALID_PLAYER_ID) {
if(IsPlayerInAnyVehicle(killerid)) {
if(gPlayerPassenger[killerid] != 1) {
new string[128];
format(string, sizeof(string), "[SERVER]: %s wurde vom [SERVERGUARD] für 12 Stunden Zeitgebannt, Grund: Totparken", GetName(killerid));
SCMTA(COLOR_LIGHTRED, string);
new zeitdauer=gettime()+12*60*60;
new query[256];
format(query,sizeof(query),"UPDATE `accounts` SET `tban`='%i' WHERE `name`='%s'",zeitdauer,GetName(killerid));
mysql_query(query);
KickEx(killerid);
}
}
}
}
if(reason == 50) {
if(killerid != INVALID_PLAYER_ID) {
if(IsPlayerInAnyVehicle(killerid)) {
new string[128];
format(string, sizeof(string), "[SERVER]: %s wurde vom [SERVERGUARD] für 12 Stunden Zeitgebannt, Grund: Rotorkill", GetName(killerid));
SCMTA(COLOR_LIGHTRED, string);
new zeitdauer=gettime()+12*60*60;
new query[256];
format(query,sizeof(query),"UPDATE `accounts` SET `tban`='%i' WHERE `name`='%s'",zeitdauer,GetName(killerid));
mysql_query(query);
KickEx(killerid);
}
}
}
if(M_GetPlayerCurrentZone(playerid) > -1)
{
new gzone = M_GetPlayerCurrentZone(playerid) ;
if(Gebiete[gzone][gOn] == 1)
{
if(SpielerInfo[playerid][sMember]==Gebiete[gzone][gOwner])
{
if(SpielerInfo[killerid][sMember] == Gebiete[gzone][gAngreifer])
{
Gebiete[gzone][gStand2] ++;
}
}
if(SpielerInfo[playerid][sMember]==Gebiete[gzone][gAngreifer])
{
if(SpielerInfo[killerid][sMember] == Gebiete[gzone][gOwner])
{
Gebiete[gzone][gStand1] ++;
}
}
}
new string[64];
format(string,sizeof(string),"%s: %i VS. %s: %i",Fracs[Gebiete[gzone][gAngreifer]-1],Gebiete[gzone][gStand2],Fracs[Gebiete[gzone][gOwner]-1],Gebiete[gzone][gStand1]);
TextDrawHideForPlayer(playerid,gKills[playerid]);
TextDrawSetString(gKills[playerid],string);
TextDrawShowForPlayer(playerid,gKills[playerid]);
format(string,sizeof(string),"**GANGFIGHT** Du wurdest von: %s[%i] getötet.",GetName(killerid),killerid);
SCM(playerid,COLOR_WHITE,string);
format(string,sizeof(string),"**GANGFIGHT** Du hast: %s[%i] getötet.",GetName(playerid),playerid);
SCM(killerid,COLOR_WHITE,string);
SpielerIstTot[playerid] = 0;
SpielerInfo[playerid][pTottime] = 0;
}
for(new i; i<sizeof(Gebiete); i++)
{
GangZoneHideForPlayer(playerid,Gebiet[i]);
}
GangZoneHideForPlayer(playerid, NODMBSN);
GangZoneHideForPlayer(playerid, NODMSH);
GangZoneHideForPlayer(playerid, NODMNEWB);
RemovePlayerAttachedObject(playerid, 1);
new string[256];
if(killerid != 255)
{
if(GetPlayerState(killerid) == 2)
{
if(!IsPlayerInAnyVehicle(playerid))
{
if(SpielerInfo[killerid][pAdmin] < 1)
{
SCM(killerid, COLOR_RED, "Drive-by verboten!");
SCM(killerid, COLOR_GREEN, "Automatische Meldung an die Admins gesendet.");
}
}
}
}
new x[2], id, Float:ppos[3];
GetPlayerPos(playerid, ppos[0], ppos[1], ppos[2]);
#if !defined VIRTUAL
new vw = GetPlayerVirtualWorld(playerid);
#endif
for(new i = 1; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, x[0], x[1]);
if(!x[0] || !GetWeaponModel(x[0]))
continue;
#if !defined VIRTUAL
id = CreatePickup(GetWeaponModel(x[0]), 1, ppos[0]+adpos[i-1][0], ppos[1]+adpos[i-1][1], ppos[2], vw);
#else
id = CreatePickup(GetWeaponModel(x[0]), 1, ppos[0]+adpos[i-1][0], ppos[1]+adpos[i-1][1], ppos[2], VIRTUAL);
#endif
wpickups[id][i-1][2] = SetTimerEx("PickupDel", WEP_TIME, 0, "dd", id, i);
wpickups[id][i-1][0] = x[0];
wpickups[id][i-1][1] = x[1];
}
new name[MAX_PLAYER_NAME];
//new dmessage[128];
//new deathreason[20];
new playercash;
new victimteam;
//new killerteam;
victimteam = gTeam[playerid];
//killerteam = gTeam[killerid];
gPlayerSpawned[playerid] = 0;
GetPlayerName(playerid, name, sizeof(name));
SpielerInfo[playerid][pLocal] = 999;
if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
{
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
}
new caller = Mobile[playerid];
if(caller != INVALID_PLAYER_ID)
{
if(caller < 999)
{
SCM(caller, COLOR_GRAD2, " Die Verbindung wurde unterbrochen....");
CellTime[caller] = 0;
SetPlayerSpecialAction(playerid,13);
CellTime[playerid] = 0;
Mobile[caller] = INVALID_PLAYER_ID;
}
Mobile[playerid] = INVALID_PLAYER_ID;
CellTime[playerid] = 0;
SetPlayerSpecialAction(playerid,13);
}
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);
SCM(i, COLOR_WHITE, string);
}
}
}
}
return 1;
}
if(SpielerInfo[playerid][pHeadValue] > 0)
{
if(IsPlayerConnected(killerid))
{
if(gTeam[killerid] == 10 || SpielerInfo[killerid][sMember] == 8)
{
if(GoChase[killerid] == playerid)
{
ConsumingMoney[killerid] = 1;
new killer[MAX_PLAYER_NAME];
GetPlayerName(killerid, killer, sizeof(killer));
PlayerMoney[killerid] = PlayerMoney[killerid]+SpielerInfo[playerid][pHeadValue];
format(string,128,"<< Hitman %s hat den Auftrag an %s erfüllt und bekommt: €%d >>",killer,name,SpielerInfo[playerid][pHeadValue]);
SendFamilyMessage(8, COLOR_YELLOW, string);
SCM(playerid, COLOR_YELLOW, "Du wurdest von einem Hitman wegen eines Auftrags getötet!");
SpielerInfo[playerid][pHeadValue] = 0;
GotHit[playerid] = 0;
SetPVarInt(GetChased[playerid],"KillID",-1);
GetChased[playerid] = 999;
GoChase[killerid] = 999;
}
}
}
}
SpielerInfo[playerid][pDeaths] += 1;
if(GetPlayerWantedLevel(playerid) >= 1)
{
new price = (GetPlayerWantedLevel(playerid) * 50);
if(IsACop(killerid))
{
PlayerMoney[playerid] = PlayerMoney[playerid]- price;
Staatskasse = Staatskasse+price;
SpielerInfo[playerid][pWantedDeaths] += 1;
SpielerInfo[playerid][pJailed] = 1;
if(GetPlayerWantedLevel(playerid) > 5) SpielerInfo[playerid][pJailTime] = (GetPlayerWantedLevel(playerid) * 1)+30; // 13 Minuten
else SpielerInfo[playerid][pJailTime] = GetPlayerWantedLevel(playerid) * 6;
format(string, sizeof(string), "Du bist für %d Minuten im Gefängnis und musst €%d bezahlen.", SpielerInfo[playerid][pJailTime], price);
SCM(playerid, COLOR_LIGHTRED, string);
SetPlayerWantedLevel(playerid,0);
new playername[MAX_PLAYER_NAME], copname[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerName(killerid, copname, sizeof(copname));
format(string, sizeof(string), "Für die tötung der Person %s hast du %d € erhalten!", playername, price);
SpielerIstTot[playerid] = 0;
SpielerInfo[playerid][pTottime] = 0;
format(string, sizeof(string), "**%s hat die gesuchte Person %s getötet!", copname, playername);
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsACop(i))
{
SCM(i, COLOR_LIGHTBLUE, "** An Alle Einheiten **");
SCM(i, COLOR_RED, string);
}
}
}
}
if(victimteam >= 4)
{
if(IsPlayerConnected(killerid))
{
new slice = 0; //$0
playercash = PlayerMoney[playerid];
if(gTeam[killerid] != 2) { } //+ 2 wanted points
if(SafeTime[playerid] == 0)
{
if(gTeam[killerid] != gTeam[playerid])
{
if(GetPlayerState(killerid) == 1)
{
SpielerInfo[killerid][pKills] = SpielerInfo[killerid][pKills] + 2;
}
else
{
SpielerInfo[killerid][pKills]++;
}
SpielerInfo[playerid][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)
{
PlayerMoney[playerid] = PlayerMoney[playerid]-slice;
}
else
{
slice = slice+500;
}
PlayerMoney[killerid] = PlayerMoney[killerid]+slice;
PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
}
}
else if (victimteam == 3)
{
if(IsPlayerConnected(killerid))
{
if(gTeam[killerid] == 2)//cops kill civ
{
if(GetPlayerWantedLevel(playerid) < 1)
{
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
}
}
}
}
if(GetPlayerWantedLevel(playerid) > 0)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
new price = (GetPlayerWantedLevel(playerid)*50);
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(i, pX, pY, pZ);
if(IsPlayerInRangeOfPoint(playerid, 15.0, pX, pY, pZ) && IsACop(i))
{
PlayerMoney[playerid] = PlayerMoney[playerid]- price;
Staatskasse = Staatskasse+price;
SpielerInfo[playerid][pWantedDeaths] += 1;
SpielerInfo[playerid][pJailed] = 1;
if(GetPlayerWantedLevel(playerid) > 5) SpielerInfo[playerid][pJailTime] = (GetPlayerWantedLevel(playerid) * 3)+30; // 13 Minuten
else SpielerInfo[playerid][pJailTime] = GetPlayerWantedLevel(playerid) * 6;
format(string, sizeof(string), "Du bist für %d Minuten im Gefängnis und musst €%d bezahlen.", SpielerInfo[playerid][pJailTime], price);
SCM(playerid, COLOR_LIGHTRED, string);
SetPlayerWantedLevel(playerid,0);
new playername[MAX_PLAYER_NAME], copname[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerName(i, copname, sizeof(copname));
format(string, sizeof(string), "Für die tötung der Person %s hast du %d € erhalten!", playername, price);
format(string, sizeof(string), "**%s hat die gesuchte Person %s getötet!", copname, playername);
for(new c = 0; c<MAX_PLAYERS; c++)
{
if(IsACop(c))
{
SCM(c, COLOR_LIGHTBLUE, "** An Alle Einheiten **");
SCM(c, COLOR_RED, string);
}
}
return 1;
}
}
}
ImShamalInterior[playerid] = 0;
ShamalID[playerid] = -1;
return 1;
}
Alles anzeigen