OnPlayerDeath ?????
#1

i want if player die take from him 1 score and 2000 money and killer get 4000 money and 2 score

but its give killer only 100 money and 2 score and who die did not take from him score or money

this in my gamemode :

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
if(
killerid != INVALID_PLAYER_ID)
{
SetPlayerScore(killeridGetPlayerScore(killerid)+2);
GivePlayerMoney(killerid4000);
SendClientMessage(killerid, -1"Congratulation!You have gained 4000$ and +2 score.");
SetPlayerScore(playeridGetPlayerScoreplayerid ) -);
GivePlayerMoney(playerid, -2000);
SendClientMessage(playerid, -1"You lost 2000$ because you got killed.");
}
return 
1
Reply
#2

Check your filterscripts to make sure there's nothing that would interfere with this code. Example: One of the filterscripts might be giving the killer - money for killing someone.
Reply
#3

no , i checked on all my filterscript but no one of them have this code plz help
Reply
#4

Try this:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
	{
	SetPlayerScore(killerid, GetPlayerScore(killerid)+2);
	GivePlayerMoney(killerid, 4000);
	SendClientMessage(killerid, -1, "Congratulation!You have gained 4000$ and +2 score.");
	SetPlayerScore(playerid, GetPlayerScore(playerid) -1);
	GivePlayerMoney(playerid, -2000);
	SendClientMessage(playerid, -1, "You lost 2000$ because you got killed.");
	}
	return 1;
}
Reply
#5

no this if i kill anyone i get 2 score and no money and if i killed i lose only 100 money ,

if u help me +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)