12.10.2009, 19:28
here post the code OnPlayer Death
public OnPlayerDeath(playerid, killerid, reason)
{
new playercash;
if(killerid == INVALID_PLAYER_ID) {
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason );
ResetPlayerMoney(playerid);
} else {
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1 );
playercash = GetPlayerMoney(playerid);
if (playercash > 0) {
GivePlayerMoney(killerid, playercash);
ResetPlayerMoney(playerid);
}
else
{
}
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
new playercash;
if(killerid == INVALID_PLAYER_ID) {
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason );
ResetPlayerMoney(playerid);
} else {
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1 );
playercash = GetPlayerMoney(playerid);
if (playercash > 0) {
GivePlayerMoney(killerid, playercash);
ResetPlayerMoney(playerid);
}
else
{
}
}
return 1;
}