Help with > OnPlayerDeath
#3

Here you go
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid,playerid,reason); //Sending the death msg
    SetPlayerChatBubble(playerid, "XC", 0xFFFF0000, 100.0, 3000);
	if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
 	{
		SetPlayerScore(killerid, GetPlayerScore(killerid) + 2); //Giving +2 score to the killer
		GivePlayerMoney(killerid, 100); //Giving 100$ to the killer
		
                GivePlayerMoney(playerid, -100); //taking 100$ from the player that died
                SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
	}
	return 1;
}
Edit: fixed the code
Reply


Messages In This Thread
Help with > OnPlayerDeath - by RiChArD_A - 01.04.2013, 00:16
Re: Help with > OnPlayerDeath - by Pawnie - 01.04.2013, 00:59
Re: Help with > OnPlayerDeath - by Pawnie - 01.04.2013, 01:11
AW: Help with > OnPlayerDeath - by [AK]Nazgul - 01.04.2013, 06:09
Respuesta: Help with > OnPlayerDeath - by RiChArD_A - 01.04.2013, 10:14

Forum Jump:


Users browsing this thread: 1 Guest(s)