10.11.2009, 16:13
Define this(change it to whatever if you want):
Replace your with this below:
Then add this function:
Код:
new money;
Код:
public OnPlayerDeath(playerid, killerid, reason) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); money = CreatePickup(1212, 2, Float:X, Float:Y, Float:Z); PlayerPlaySound(playerid,1150,Float:X,Float:Y,Float:Z); GetPlayerWeapon(playerid); ResetPlayerWeapons(playerid); GameTextForPlayer(playerid,"~w~Miris",4000,4); GivePlayerMoney(playerid,-250);//player who dies get -250 //------------------------------------------------------------------------------ SendDeathMessage(killerid, playerid, reason); GameTextForPlayer(killerid,"~r~Slepkava!",4000,4); return 1; }
Код:
public OnPlayerPickUpPickup(playerid, pickupid) { if ( pickupid == money) { GivePlayerMoney(playerid, 250); return 1; } return 0; }