Was hälst du davon?
public OnPlayerDeath(playerid, killerid, reason) {
if(killerid != INVALID_PLAYER_ID) { // Hier bestand dein Problem.
if(isPlayerInFrakt(killerid, 1)) {
SetPlayerScore(killerid, GetPlayerScore(killerid) + 2);
} else {
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
}
new playercash = GetPlayerMoney(playerid);
if(playercash > 0) {
new killstr[18],
deathstr[18];
SetPVarInt(killerid, "Bank", GetPVarInt(killerid,"Bank") + playercash);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 500);
format(killstr, sizeof(killstr), "+ %i$ (Bank)", playercash);
format(deathstr, sizeof(deathstr), "- %i$", playercash);
GameTextForPlayer(killerid, killstr, 2000, 1);
GameTextForPlayer(playerid, deathstr, 2000, 1);
}
}
}