pawn Код:
CMD:moneyrush(playerid)
{
if(!PlayerInfo[playerid][pSpawn]) return SendClientMessage(playerid,COLOR_ERROR,ERROR_NOT_SPAWNED);
new bags = 0, string[50];
for(new i=0; i < MAX_BAGS; i++)
{
if(PlayerMoneyBagInfo[i][pBagDropped])
{
bags++;
if(bags < 16 && bags > 0)
{
ShowTextDrawMenu(playerid, TD_MENU_INFO,"~G~Money Bags", bags+3, 0);
if(!MoneyBagInfo[LostGoldBag] && !MoneyBagInfo[LostMoneyBag])ShowTextDrawMenuItems(playerid, 0, "~r~No ~b~ Mafia ~G~Money Bag ~R~Lost", " ", " ",0);
else
{
if(MoneyBagInfo[LostMoneyBag])format(string,sizeof(string),"~B~Mafia ~G~Money Bag ~W~In ~P~%s",MoneyBagInfo[BagLoc]);
else format(string,sizeof(string),"~B~Mafia ~Y~Gold Bag ~W~In ~P~%s",MoneyBagInfo[BagLoc]);
ShowTextDrawMenuItems(playerid, 0, string, " ", " ",0);
}
format(string,sizeof(string),"~P~%s ~W~by %s",PlayerMoneyBagInfo[i][pBagLoc],PlayerMoneyBagInfo[i][pBagDroppedBy]);
ShowTextDrawMenuItems(playerid, bags+2, " ", string, " ",0);
}
}
}
if(bags == 0)
{
ShowTextDrawMenu(playerid, TD_MENU_INFO,"~G~Money Bags", bags+1, 0);
if(!MoneyBagInfo[LostGoldBag] && !MoneyBagInfo[LostMoneyBag])ShowTextDrawMenuItems(playerid, 0, "~r~No ~b~ Mafia ~G~Money Bag ~R~Lost", " ", " ",0);
else
{
if(MoneyBagInfo[LostMoneyBag])format(string,sizeof(string),"~B~Mafia ~G~Money Bag ~W~In ~P~%s",MoneyBagInfo[BagLoc]);
else format(string,sizeof(string),"~B~Mafia ~Y~Gold Bag ~W~In ~P~%s",MoneyBagInfo[BagLoc]);
ShowTextDrawMenuItems(playerid, 0, string, " ", " ",0);
}
ShowTextDrawMenuItems(playerid, bags+1, " ", "~R~ No ~W~Players ~G~Money Bag~R~ Lost ", " ",0);
}
return 1;
}