Fast Jedesmal wenn ich oder ein anderer User Stirbt bekommt man einen Crash also der der gestorben ist bekommt einen Crash und das auch eigentlich nur beim Respawnen wo könnte der Fehler liegen also es liegt auf jedenfall am script aber wo soll ich nach dem fehler suchen ?
Crash bei tod
- JohnyDream
- Geschlossen
- Erledigt
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
-
-
Irgendwelche Modifikationen die du installiert hast? Es muss nicht unbedingt am Script liegen, wenn du mit ein paar Modifikationen grötzt baust, kann es auch daran liegen.
Du könntest ja auch mal den Crash Report posten, dann könnte man mal nachschauen, ob es nicht doch eine andere Ursache hat. Hier zum Beispiel findest du eine Error-Datenbank: http://forum.your-roleplay.com…-Roleplay-Error-Database/ . Schau dort einfach mal nach, oder poste den Code und ich schaue nach. -
Zeig mal OnPlayerDeath
-
Function OnPlayerDeath(playerid, killerid, reason)
{
GW_OnPlayerDeath(playerid, killerid, reason);
M_OnPlayerDeath(playerid,killerid,reason);
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid, pX, pY, pZ);
TotenKopf[playerid] = CreatePickup(1275,1, pX, pY, pZ);
SetTimerEx("tot", 90000, false, "d", playerid);
new Float:x, Float:y, Float:z, name[MAX_PLAYER_NAME];
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
GetPlayerName(playerid, name, sizeof(name));
format(stringz, sizeof(stringz), "%s", name);
DeathText[playerid] = Create3DTextLabel(stringz,0xFFFFFFAA, Float:x, Float:y, Float:z, 10.0, 0);
new string[256];
PlayerInfo[playerid][pInvWeapon] = 0;
PlayerInfo[playerid][pInvAmmo] = 0;
PlayerInfo[playerid][pInvWeapon2] = 0;
PlayerInfo[playerid][pInvAmmo2] = 0;
PlayerInfo[playerid][pMats] = 0;
PlayerInfo[playerid][pDrugs] = 0;
FrakMatsHolding[playerid] = 0;
//Death
if(PlayerInfo[playerid][pKrankenkasse] == 0)
{
GivePlayerMoney(playerid, -1500);
SetPlayerHealth(playerid,150);
FraktionsKasse[4] += 1500;
}
if(PlayerInfo[playerid][pKrankenkasse] == 1)
{
FraktionsKasse[4] += 1500;
}
//Death
new playercash;
new victimteam;
new killerteam;
/*if(!IsACop(killerid))
{
WantedPoints[killerid]+=2;
SetPlayerCriminal(killerid,255,"Vorsätzlicher Mord");
}*/
if(PlayerInfo[playerid][pLevel] > 2 && KHSperre[playerid] == 0 && PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][pCPP] == 0 && PlayerInfo[playerid][pwJailed] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)
{
PlayerInfo[playerid][pTot] = 1;
}
if(gPlayerUsingLoopingAnim[playerid])
{
gPlayerUsingLoopingAnim[playerid] = 0;
TextDrawHideForPlayer(playerid,txtAnimHelper);
}
if(PlayerOnFire[playerid])
{
SendClientMessage(playerid, 0xff000000, "Du bist verbrannt!"); StopPlayerBurning(playerid);
}
if(BlindFold[playerid] == 1)
{
BlindFold[playerid] = 0;
}
if(PlayerInfo[playerid][pMauled] == 1)
{
PlayerInfo[playerid][pMauled] = 0;
}
InCargo[playerid] = 0; InLevi[playerid] = 0; InEnfo[playerid] = 0;
if(FirstSpawn[playerid] == 1)
{
FirstSpawn[playerid] = 0;
}
if(TakeOverTime[playerid] > 0)
{
for(new idd; idd<GangZones_Index;idd++)
{
if(idd == TakeOver[playerid])
{
GangZoneStopFlashForAll(GangZones[idd][gzID]);
}
}
new job, job2;
if(PlayerInfo[playerid][pMember] >0)
{
job = PlayerInfo[playerid][pMember];
}
else if(PlayerInfo[playerid][pLeader] >0)
{
job = PlayerInfo[playerid][pLeader];
}
format(ALLSTRING, sizeof(ALLSTRING), "Der Angreifer ist gestorben, Angriff fehlgeschlagen.");
for(new i; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pMember] >0)
{
job2 = PlayerInfo[i][pMember];
}
else if(PlayerInfo[i][pLeader] >0)
{
job2 = PlayerInfo[i][pLeader];
}
if(job2 == job)
{
SendClientMessage(i, COLOR_RED, string);
}
}
format(string, sizeof(string), "Dieses Gebiet bleibt in eurem Besitz, der Angreifer ist gestorben!");
for(new i; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pMember] >0)
{
job2 = PlayerInfo[i][pMember];
}
else if(PlayerInfo[i][pLeader] >0)
{
job2 = PlayerInfo[i][pLeader];
}
if(GangZones[TakeOver[playerid]][owner] == job2)
{
SendClientMessage(i, COLOR_GREEN, string);
}
}
TakeOver[playerid] = 255;
TakeOverTime[playerid] = 0;
}
//=======================
victimteam = gTeam[playerid];
killerteam = gTeam[killerid];
gPlayerSpawned[playerid] = 0;
GetPlayerName(playerid, name, sizeof(name));
PlayerInfo[playerid][pLocal] = 255;
if(killerid != 255)
if(reason == 38)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, "Warnung: [%d]%s hat einen Spieler mit einer Minigun gekillt. ACHTUNG [CheatVerdacht].",killerid,kickname);
ABroadCast(COLOR_YELLOW,string,1);
printf("%s", kstring);
}
}
if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
{
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
}
new caller = Mobile[playerid];
if(caller != 255)
{
if(caller < 255)
{
SendClientMessage(caller, COLOR_GRAD2, " Die Verbindung wurde unterbrochen....");
CellTime[caller] = 0;
CellTime[playerid] = 0;
Mobile[caller] = 255;
}
Mobile[playerid] = 255;
CellTime[playerid] = 0;
}
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);
SendClientMessage(i, COLOR_WHITE, string);
}
}
}
}
return 1;
}
if(GettingCK[playerid] < 999 OnCK[playerid] < 999)
{
if(IsPlayerConnected(killerid))
{
if(GettingCK[killerid] < 999 OnCK[playerid] < 999)
{
new killer[MAX_PLAYER_NAME];
new dier[MAX_PLAYER_NAME];
GetPlayerName(playerid, dier, sizeof(dier));
GetPlayerName(killerid, killer, sizeof(killer));
format(string, sizeof(string), "* %s hat deinen Charakter gesperrt, du kannst nun mit diesem Charakter nicht mehr Spielen.",killer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "** %s hat den Spieler %s erledigt**",killer,dier);
CKLog(string);
PlayerInfo[playerid][pCK] = 1;
if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
KickPlayer[playerid] = 1;
}
}
}
if(PlayerInfo[playerid][pHeadValue] > 0)
{
if(IsPlayerConnected(killerid))
{
if(PlayerInfo[killerid][pMember] == 8 PlayerInfo[killerid][pLeader] ==
{
if(GoChase[killerid] == playerid)
{
ConsumingMoney[killerid] = 1;
new killer[MAX_PLAYER_NAME];
GetPlayerName(killerid, killer, sizeof(killer));
new fkasse = PlayerInfo[playerid][pHeadValue];
FraktionsKasse[7] += fkasse;
GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
format(string,128,"<< Hitman %s hat den Auftrag an %s erfüllt und bekommt: $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]);
SendFamilyMessage(8, COLOR_YELLOW, string);
PlayerInfo[playerid][pHeadValue] = 0;
GotHit[playerid] = 0;
GetChased[playerid] = 999;
GoChase[killerid] = 999;
}
}
}
}
if(victimteam >= 4)
{
if(IsPlayerConnected(killerid))
{
new slice = 100; //$100
playercash = GetPlayerMoney(playerid);
WantedPoints[killerid] += 2; //+ 2 wanted points
if(gTeam[killerid] != 2 && PlayerInfo[killerid][pMember] != 7) { WantedPoints[killerid] += 2; } //+ 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]++;
}
PlayerInfo[playerid][pDeaths]++;
}
}
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);
WantedPoints[killerid] ++; //+ 2 wanted points
WantedPoints[killerid] ++;
PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
if (((gTeam[killerid]) == 3) && reason != 49 && PlayerInfo[killerid][pJailed] == 0 && !IsPlayerInArea(killerid, 560.538, -724.0283, 875.8406, -362.0141))
{
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
PlayerInfo[playerid][pKills]--;
if (gTeam[killerid] == 2)//cops kill cop
{
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoney(killerid, -suecost);
GivePlayerMoney(playerid, suecost+1);//+100pays hospital bill
}
if (gTeam[killerid] >= 3)
{
WantedPoints[killerid] += 2; //+ 2 wanted points
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]+2;
}
else
{
PlayerInfo[killerid][pKills]++;
}
WantedPoints[killerid]+=2;
}
}
}
else if (victimteam == 3)
{
if(IsPlayerConnected(killerid))
{
// Civ kill
if ((gTeam[killerid]) == 2 PlayerInfo[killerid][pMember] == 7)//cops kill civ
{
if(WantedLevel[playerid] < 1)
{
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
WantedPoints[killerid] += 2; //+ 2 wanted points
GivePlayerMoney(killerid, -suecost);
GivePlayerMoney(playerid, suecost+1);//+100pays hospital bill
}
}
else
{
WantedPoints[killerid] += 2;
}
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
{
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoney(killerid, -suecost);
GivePlayerMoney(playerid, suecost+1);//+100pays hospital bill
}
else if ((gTeam[killerid]) == 1)//med kill civ
{
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoney(killerid, -suecost);
GivePlayerMoney(playerid, suecost+1);//+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");
}
if(IsPlayerInArea(playerid, 560.538, -724.0283, 875.8406, -362.0141))
{
GameTextForPlayer(playerid, "~r~Gangfightdeath", 5000, 3);
PlayerInfo[playerid][pGDeaths]++;
GameTextForPlayer(killerid, "~g~Gangfightkill", 5000, 3);
WantedPoints[killerid] += 2; //+ 2 wanted points
PlayerInfo[killerid][pGKills]++;
GivePlayerMoney(killerid, 1500);
GivePlayerMoney(playerid, -1500);
}
killerid = INVALID_PLAYER_ID;
SetPlayerColor(playerid,COLOR_GRAD2);
return 1;
} -
Fuction ~> zu public evtl
Mfg. -
Function OnPlayerDeath(playerid, killerid, reason)
{
GW_OnPlayerDeath(playerid, killerid, reason);
M_OnPlayerDeath(playerid,killerid,reason);
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid, pX, pY, pZ);
TotenKopf[playerid] = CreatePickup(1275,1, pX, pY, pZ);
SetTimerEx("tot", 90000, false, "d", playerid);
new Float:x, Float:y, Float:z, name[MAX_PLAYER_NAME];
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
GetPlayerName(playerid, name, sizeof(name));
format(stringz, sizeof(stringz), "%s", name);
DeathText[playerid] = Create3DTextLabel(stringz,0xFFFFFFAA, Float:x, Float:y, Float:z, 10.0, 0);
new string[256];
PlayerInfo[playerid][pInvWeapon] = 0;
PlayerInfo[playerid][pInvAmmo] = 0;
PlayerInfo[playerid][pInvWeapon2] = 0;
PlayerInfo[playerid][pInvAmmo2] = 0;
PlayerInfo[playerid][pMats] = 0;
PlayerInfo[playerid][pDrugs] = 0;
FrakMatsHolding[playerid] = 0;
//Death
if(PlayerInfo[playerid][pKrankenkasse] == 0)
{
GivePlayerMoney(playerid, -1500);
SetPlayerHealth(playerid,150);
FraktionsKasse[4] += 1500;
}
if(PlayerInfo[playerid][pKrankenkasse] == 1)
{
FraktionsKasse[4] += 1500;
}
//Death
new playercash;
new victimteam;
new killerteam;
/*if(!IsACop(killerid))
{
WantedPoints[killerid]+=2;
SetPlayerCriminal(killerid,255,"Vorsätzlicher Mord");
}*/
if(PlayerInfo[playerid][pLevel] > 2 && KHSperre[playerid] == 0 && PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][pCPP] == 0 && PlayerInfo[playerid][pwJailed] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)
{
PlayerInfo[playerid][pTot] = 1;
}
if(gPlayerUsingLoopingAnim[playerid])
{
gPlayerUsingLoopingAnim[playerid] = 0;
TextDrawHideForPlayer(playerid,txtAnimHelper);
}
if(PlayerOnFire[playerid])
{
SendClientMessage(playerid, 0xff000000, "Du bist verbrannt!"); StopPlayerBurning(playerid);
}
if(BlindFold[playerid] == 1)
{
BlindFold[playerid] = 0;
}
if(PlayerInfo[playerid][pMauled] == 1)
{
PlayerInfo[playerid][pMauled] = 0;
}
InCargo[playerid] = 0; InLevi[playerid] = 0; InEnfo[playerid] = 0;
if(FirstSpawn[playerid] == 1)
{
FirstSpawn[playerid] = 0;
}
if(TakeOverTime[playerid] > 0)
{
for(new idd; idd[pMember] >0)
{
job2 = PlayerInfo[pMember];
}
else if(PlayerInfo[pLeader] >0)
{
job2 = PlayerInfo[pLeader];
}
if(job2 == job)
{
SendClientMessage(i, COLOR_RED, string);
}
}
format(string, sizeof(string), "Dieses Gebiet bleibt in eurem Besitz, der Angreifer ist gestorben!");
for(new i; i[pMember] >0)
{
job2 = PlayerInfo[pMember];
}
else if(PlayerInfo[pLeader] >0)
{
job2 = PlayerInfo[pLeader];
}
if(GangZones[TakeOver[playerid]][owner] == job2)
{
SendClientMessage(i, COLOR_GREEN, string);
}
}
TakeOver[playerid] = 255;
TakeOverTime[playerid] = 0;
}
//=======================
victimteam = gTeam[playerid];
killerteam = gTeam[killerid];
gPlayerSpawned[playerid] = 0;
GetPlayerName(playerid, name, sizeof(name));
PlayerInfo[playerid][pLocal] = 255;
if(killerid != 255)
if(reason == 38)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, "Warnung: [%d]%s hat einen Spieler mit einer Minigun gekillt. ACHTUNG [CheatVerdacht].",killerid,kickname);
ABroadCast(COLOR_YELLOW,string,1);
printf("%s", kstring);
}
}
if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
{
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
}
new caller = Mobile[playerid];
if(caller != 255)
{
if(caller < 255)
{
SendClientMessage(caller, COLOR_GRAD2, " Die Verbindung wurde unterbrochen....");
CellTime[caller] = 0;
CellTime[playerid] = 0;
Mobile[caller] = 255;
}
Mobile[playerid] = 255;
CellTime[playerid] = 0;
}
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 != 0)
{
format(string, sizeof(string), "* %s ist mit %d Kills in Führung.",killer,PaintballWinnerKills);
SendClientMessage(i, COLOR_WHITE, string);
}
}
}
}
return 1;
}
if(GettingCK[playerid] < 999 || OnCK[playerid] < 999)
{
if(IsPlayerConnected(killerid))
{
if(GettingCK[killerid] < 999 || OnCK[playerid] < 999)
{
new killer[MAX_PLAYER_NAME];
new dier[MAX_PLAYER_NAME];
GetPlayerName(playerid, dier, sizeof(dier));
GetPlayerName(killerid, killer, sizeof(killer));
format(string, sizeof(string), "* %s hat deinen Charakter gesperrt, du kannst nun mit diesem Charakter nicht mehr Spielen.",killer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "** %s hat den Spieler %s erledigt**",killer,dier);
CKLog(string);
PlayerInfo[playerid][pCK] = 1;
if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
KickPlayer[playerid] = 1;
}
}
}
if(PlayerInfo[playerid][pHeadValue] > 0)
{
if(IsPlayerConnected(killerid))
{
if(PlayerInfo[killerid][pMember] == 8 || PlayerInfo[killerid][pLeader] == 8)
{
if(GoChase[killerid] == playerid)
{
ConsumingMoney[killerid] = 1;
new killer[MAX_PLAYER_NAME];
GetPlayerName(killerid, killer, sizeof(killer));
new fkasse = PlayerInfo[playerid][pHeadValue];
FraktionsKasse[7] += fkasse;
GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
format(string,128,"<< Hitman %s hat den Auftrag an %s erfüllt und bekommt: $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]);
SendFamilyMessage(8, COLOR_YELLOW, string);
PlayerInfo[playerid][pHeadValue] = 0;
GotHit[playerid] = 0;
GetChased[playerid] = 999;
GoChase[killerid] = 999;
}
}
}
}
if(victimteam >= 4)
{
if(IsPlayerConnected(killerid))
{
new slice = 100; //$100
playercash = GetPlayerMoney(playerid);
WantedPoints[killerid] += 2; //+ 2 wanted points
if(gTeam[killerid] != 2 && PlayerInfo[killerid][pMember] != 7) { WantedPoints[killerid] += 2; } //+ 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]++;
}
PlayerInfo[playerid][pDeaths]++;
}
}
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);
WantedPoints[killerid] ++; //+ 2 wanted points
WantedPoints[killerid] ++;
PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
if (((gTeam[killerid]) == 3) && reason != 49 && PlayerInfo[killerid][pJailed] == 0 && !IsPlayerInArea(killerid, 560.538, -724.0283, 875.8406, -362.0141))
{
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
PlayerInfo[playerid][pKills]--;
if (gTeam[killerid] == 2)//cops kill cop
{
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoney(killerid, -suecost);
GivePlayerMoney(playerid, suecost+1);//+100pays hospital bill
}
if (gTeam[killerid] >= 3)
{
WantedPoints[killerid] += 2; //+ 2 wanted points
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]+2;
}
else
{
PlayerInfo[killerid][pKills]++;
}
WantedPoints[killerid]+=2;
}
}
}
else if (victimteam == 3)
{
if(IsPlayerConnected(killerid))
{
// Civ kill
if ((gTeam[killerid]) == 2 || PlayerInfo[killerid][pMember] == 7)//cops kill civ
{
if(WantedLevel[playerid] < 1)
{
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
WantedPoints[killerid] += 2; //+ 2 wanted points
GivePlayerMoney(killerid, -suecost);
GivePlayerMoney(playerid, suecost+1);//+100pays hospital bill
}
}
else
{
WantedPoints[killerid] += 2;
}
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
{
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoney(killerid, -suecost);
GivePlayerMoney(playerid, suecost+1);//+100pays hospital bill
}
else if ((gTeam[killerid]) == 1)//med kill civ
{
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoney(killerid, -suecost);
GivePlayerMoney(playerid, suecost+1);//+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");
}
if(IsPlayerInArea(playerid, 560.538, -724.0283, 875.8406, -362.0141))
{
GameTextForPlayer(playerid, "~r~Gangfightdeath", 5000, 3);
PlayerInfo[playerid][pGDeaths]++;
GameTextForPlayer(killerid, "~g~Gangfightkill", 5000, 3);
WantedPoints[killerid] += 2; //+ 2 wanted points
PlayerInfo[killerid][pGKills]++;
GivePlayerMoney(killerid, 1500);
GivePlayerMoney(playerid, -1500);
}
killerid = INVALID_PLAYER_ID;
SetPlayerColor(playerid,COLOR_GRAD2);
return 1;
}</gangzones_index;idd++)
[i][i][/i][/i]Ändere es mal bitte, wie ich es gemacht und benutze die Funktion PWN. Sonst kann man dir echt nicht helfen.
-
Füge deine Code bitte als Pawn Quellentext ein.
Danke
Tutorial: Der Pawn BB Code - Die richtige Anwendung
#erledigt
-
Und was hast du nun geändert ?
-
breadfish.de
Hat das Thema geschlossen.