Guten Tag,
Warum kommt man bei Selbstmord nicht in das Krankenhaus:
Alles anzeigen
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerNPC(killerid))return true;
new string[600],Float:Pos[3],string2[350], dropcount = 0, hrank[25],
Float: fDistance;
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
Spieler[playerid][Funkgerat] = 0;
Spieler[playerid][TotKord][0] = Pos[0];
Spieler[playerid][TotKord][1] = Pos[1];
Spieler[playerid][TotKord][2] = Pos[2];
RemovePlayerAttachedObject(playerid,9);
RemovePlayerAttachedObject(playerid,7);
RemovePlayerAttachedObject(playerid,1);
RemovePlayerAttachedObject(playerid,2);
ImShamalInterior[playerid] = 0;
ShamalID[playerid] = -1;
CreateErfolg(playerid,20,"Von wegen Unsterblich","Stirb 1x","",0,10);
fDistance = GetPlayerDistanceFromPoint(killerid,Pos[0],Pos[1],Pos[2]);
if(Spieler[playerid][pBankRaubSumme] > 1) { RemovePlayerAttachedObject(playerid,0); Spieler[playerid][pBankRaubSumme] = 0; }
if(fDistance > 149.99) {
CreateErfolg(killerid,0,"Wie ein Geist","Ein Kill aus 150","Meter Entfernung",1,25);
}
if(rustungan[playerid] != 0) { RemovePlayerAttachedObject(playerid,9); rustungan[playerid] = 0; }
if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID && Paintball[playerid] == 0)
{
format(string,sizeof(string),"Mord : Angreifer: %s * Opfer: %s",Spieler[killerid][pName],Spieler[playerid][pName]);
Log("DeathMatchLogsqllog",string);
}
if(Spieler[playerid][pJobStart] == 1)
{
DestroyVehicle(AngelVeh[playerid]);
DisablePlayerCheckpoint(playerid);
Spieler[playerid][KeinCPMehr] = 0;
Spieler[playerid][pJobStart] = 0;
JobMarker[playerid] = 0;
KillTimer(JobTimer[playerid]);
for(new i=0;i<4;i++){ PlayerTextDrawHide(playerid,Anzeige[playerid][i]); }
SetPlayerSkinEx(playerid,Spieler[playerid][pSkin]);
EntfernungJobVariable(playerid);
UnFreeze(playerid);
SetCameraBehindPlayer(playerid);
RemovePlayerMapIcon(playerid, 1);
RemovePlayerMapIcon(playerid, 2);
RemovePlayerMapIcon(playerid, 3);
RemovePlayerMapIcon(playerid, 6);
imHolzfaller[playerid] = false;
if(Spieler[playerid][pJob] == 3) { DestroyVehicle(BackerCarPlayer[playerid]); BackerStartCP[playerid] = 0; DisablePlayerCheckpoint(playerid); BackerCARVar[playerid] = -1; }
if(Spieler[playerid][pJob] != 4) { SetPlayerVirtualWorld(playerid,0); SetPlayerInterior(playerid,0); }
if(Spieler[playerid][pJob] == 4) { EntfernungObjekteHolz(playerid); DeleteVehicle(holzauto[playerid]); }
if(Spieler[playerid][pJob] == 5) { SchiffEntfernung(playerid); DeleteVehicle(gabelauto[playerid]); }
if(Spieler[playerid][pJob] == 6) { RemovePlayerFromVehicle(playerid); SetVehicleToRespawn(GetPlayerVehicleID(playerid)); }
if(Spieler[playerid][pJob] == 1) { DeleteVehicle(AngelVeh[playerid]); Fischbestand[playerid] = 0; }
}
for(new i=0;i<sizeof(Shark);i++)
{
if(Shark[i][sh_targetid] != playerid) continue;
RandPosInZone(Shark[i][sh_minx],Shark[i][sh_miny],Shark[i][sh_maxx],Shark[i][sh_maxy],Shark[i][sh_rpos][0],Shark[i][sh_rpos][1]);
MoveDynamicObject(Shark[i][sh_obj],Shark[i][sh_rpos][0],Shark[i][sh_rpos][1],Shark[i][sh_z],MIN_SHARK_SWIMSPEED,Shark[i][sh_xr],Shark[i][sh_yr],Shark[i][sh_zr]);
Shark[i][sh_targetid] = -1;
}
if(IsPlayerConnected(killerid) && IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && !IsPlayerNPC(killerid))
{
Spieler[killerid][pMorde] += 1;
Spieler[playerid][pTote] += 1;
if(Spieler[killerid][pMorde] > 24)
{
CreateErfolg(killerid,37,"Einer nach dem Anderen","Toete 25 Spieler","",0,2);
}
if(Spieler[killerid][pMorde] > 99)
{
CreateErfolg(killerid,17,"Menschenjaeger","Toete 100 Spieler","",0,10);
}
if(Spieler[killerid][pMorde] > 999)
{
CreateErfolg(killerid,19,"Totesengel","Toete 1000 Spieler","",0,50);
}
if(Spieler[playerid][pTote] > 99)
{
CreateErfolg(killerid,21,"Opfer der Gewalt","Sterbe 100x","",0,10);
}
}
for(new i = 0; i < MAX_TOTENINFO; i++)
{
if(TotenInfo[i][tccreate] != 1 && Paintball[playerid] == 0 && Spieler[killerid][pFraktion] != 1 Spieler[killerid][pFraktion] != 2 && Spieler[killerid][pDuty] != 1)
{
TotenInfo[i][tcid] = i;
TotenInfo[i][tccreate] = 1;
TotenInfo[i][tctime] = 30;
TotenInfo[i][tcpos][0] = Pos[0]; TotenInfo[i][tcpos][1] = Pos[1]; TotenInfo[i][tcpos][2] = Pos[2];
TotenInfo[i][tcpickup] = CreatePickup(1254,1,TotenInfo[i][tcpos][0],TotenInfo[i][tcpos][1],TotenInfo[i][tcpos][2]);
TotenInfo[i][tclabel] = Create3DTextLabel(""#HTML_RED"/search",WEISS,Pos[0],Pos[1],Pos[2]+1,15.0,0,0);
if(Spieler[killerid][pHitman] == 1 && Spieler[playerid][pContract][0] == 1)
{
strmid(TotenInfo[i][tckiller],"Unbekannt",0,strlen("Unbekannt"),MAX_PLAYER_NAME+1);
strmid(TotenInfo[i][tctoter],Spieler[playerid][pName],0,strlen(Spieler[playerid][pName]),MAX_PLAYER_NAME+1);
format(string,sizeof(string),"%s",WaffenName(GetPlayerWeapon(killerid)));
strmid(TotenInfo[i][tcwaffe],string,0,strlen(string),25);
break;
}
else
strmid(TotenInfo[i][tckiller],Spieler[killerid][pName],0,strlen(Spieler[killerid][pName]),MAX_PLAYER_NAME+1);
strmid(TotenInfo[i][tctoter],Spieler[playerid][pName],0,strlen(Spieler[playerid][pName]),MAX_PLAYER_NAME+1);
format(string,sizeof(string),"%s",WaffenName(GetPlayerWeapon(killerid)));
strmid(TotenInfo[i][tcwaffe],string,0,strlen(string),25);
break;
}
}