16.04.2014, 08:43
On top of your script:
On your OnPlayerDeath:
On your OnPlayerPickUpPickup:
Not tested.
Код:
new cash_pickup;
Код:
if(GetPlayerMoney(playerid) > 3000) { // Player that died has more than 3000$ GivePlayerMoney(playerid, -3000); // Take 3000 from their money. new Float:x, Float:y, Float:z; // A place to store the place to create the pickup GetPlayerPos(playerid, x,y,z); // Get their x,y and z to create the pickup on cash_pickup = CreatePickup(1212, 5, x,y,z, -1); // Creates a pickup on the location where the player died. this pickup will disappear after some time
Код:
if(pickupid == cash_pickup) { GivePlayerMoney(playerid, 3000); // note: all players can pickup this pickup. Other players can take your cash reward. }