SA-MP Forums Archive
Money - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Money (/showthread.php?tid=548437)



Money - Seaf - 29.11.2014

i need money drop system if any one have it like /dropmoney [AMMONT] and be in shape of money bag ? any one have it /+rep


Re: Money - Aerotactics - 29.11.2014

You can't script that yourself? It's simple.

What you need:
-sscanf
-zcmd

new MoneyPickup[];
new pickupid;
new PickupAmount[];

CMD:dropmoney(playerid, params[])
{
new amount;
if(sscanf(params,"i",amount)) return SendClientMessage(playerid, -1, "Usage: /dropmoney [amount]");
MoneyPickup[pickupid] = CreatePickup((moneybag, figure it out));
PickupAmount[pickupid] = amount;
pickupid++;
return 1;
}

OnPlayerPickUpPickup()
{
for(new i=0; i<500; i++)
{
if(pickupid == MoneyPickup[i])
{
GivePlayerMoney(playerid, PickupAmount[i]);
DestroyPickup(MoneyPickup[i]);
}
}
}

You'll need to finalize that. Good luck.


Re: Money - Seaf - 30.11.2014

Quote:
Originally Posted by Aerotactics
Посмотреть сообщение
You can't script that yourself? It's simple.

What you need:
-sscanf
-zcmd

new MoneyPickup[];
new pickupid;
new PickupAmount[];

CMD:dropmoney(playerid, params[])
{
new amount;
if(sscanf(params,"i",amount)) return SendClientMessage(playerid, -1, "Usage: /dropmoney [amount]");
MoneyPickup[pickupid] = CreatePickup((moneybag, figure it out));
PickupAmount[pickupid] = amount;
pickupid++;
return 1;
}

OnPlayerPickUpPickup()
{
for(new i=0; i<500; i++)
{
if(pickupid == MoneyPickup[i])
{
GivePlayerMoney(playerid, PickupAmount[i]);
DestroyPickup(MoneyPickup[i]);
}
}
}

You'll need to finalize that. Good luck.
thanks for help +rep