Help with SendDeathMessage
#1

The other players name is coming up first when you're killing someone

example: if i were named Dark and the other player were named Austin then if i killed him then it showed up this:

Austin {Weapon} Dark

Code:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);

    PlayerInfo[killerid][pKills]++;
    PlayerInfo[playerid][pDeaths]++;
    GivePlayerMoney(killerid, 500);
    PlayerInfo[playerid][pScores]++;
	SetPlayerScore(killerid, PlayerInfo[playerid][pScores]);
	SendDeathMessage(playerid,killerid,reason);

	return 1;
}
Reply
#2

Just switch around killerid and playerid in SendDeathMessage
Reply
#3

Then it comes an error on the line is public Onplayerdeath
Код:
error 025: function heading differs from prototype
Reply
#4

He didn't mean the parameters of the OnPlayerDeath callback but in SendDeathMessage:
pawn Код:
SendDeathMessage(killerid, playerid, reason);
Reply
#5

Oh, i was kind of tired so i didn't saw where i wrote it on. lol :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)