13.02.2009, 20:31
for that we only need to change the OnPlayerPickupPickup
Destroy / Hiding / Changing the textdraw you need to do by yourself
pawn Код:
new RandomMoney[5] = { 5_000, 10_000, 15_000, ... };
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == RandomPickup)
{
DestroyPickup(RandomPickup);
SetTimer("CreateRandomPickup", 20000, false);
new RandomMoneyAmount = random(sizeof RandomMoney), string[10];
GivePlayerMoney(playerid, RandomMoney[RandomMoneyAmount]);
Textdraw3 = TextDrawCreate(112.000000,118.000000,"You found the moneybag");
Textdraw4 = TextDrawCreate(174.000000,79.000000, "Congratulations!!!");
format(string, sizeof string, "$%d", RandomMoney[RandomMoneyAmount]);
Textdraw5 = TextDrawCreate(254.000000,146.000000, string);
}
return 1;
}