26.05.2011, 20:03
I have added money in the game, but I don't know how
to set it so that when you kill someone it gives you money.
to set it so that when you kill someone it gives you money.
public OnPlayerDeath(playerid, killerid, reason)
{
//Award $10,000 to the killer
GivePlayerMoney(killerid, 10000);
}
public OnPlayerDeath(playerid, killerid, reason)
{
new string[125];
GivePlayerMoney(killerid, 50000);//Award 50,000 to the killer
format(string, sizeof(string), "You now have %d.", GetPlayerMoney(killerid));
SendClientMessage(killerid, 0xFFFFFFAA, string);
}