SendDeathMessage - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SendDeathMessage (
/showthread.php?tid=276195)
SendDeathMessage -
Admigo - 12.08.2011
Hee guys,
My SendDeathMessage dont work.
If i kill myself i dont get a death message.
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
PlayerInfo[killerid][pKills]++;
PlayerInfo[playerid][pDeaths]++;
SendDeathMessage(killerid, playerid, reason);
return 1;
}
pls fix.
Re: SendDeathMessage -
Scenario - 12.08.2011
Is your death message window set to display itself? Push F9 in-game and kill yourself again.
Re: SendDeathMessage -
Mikkel_Pedersen - 12.08.2011
That's because when you suicide killerid is INVALID_PLAYER_ID. And that is higher than your array allows (assuming you use MAX_PLAYERS) So before you do anything to killerid, check if killerid IS NOT INVALID_PLAYER_ID.
Re: SendDeathMessage -
Admigo - 12.08.2011
Its not f9. I already have it on. Its really strange. Normally i didnt had the problem.
Re: SendDeathMessage -
Admigo - 12.08.2011
Know i put the senddeathmessage into a filterscript and now it works:S
Anyway thanks for responding