Advertisement
KaLu17

[pawno.pl] -> #28651

Oct 6th, 2014
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.88 KB | None | 0 0
  1. CMD:kup(playerid, params[])
  2. {
  3.     new string[2048], temp = 0;
  4.     new doorid = PlayerDoor[playerid];
  5.     new groupid = GroupInfo[DoorInfo[doorid][dOwner]][UID];
  6.     LoadProductsType(ITEM_OWNER_GROUP, groupid);
  7.     if(DoorInfo[doorid][dOwnerType] != OWNER_GROUP) return PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  8.     ForeachEx(i, MAX_ITEMS)
  9.     {
  10.         if(Item[i][iUID] != 0 && Item[i][iOwner] == GroupInfo[groupid][UID] && Item[i][iOwnerType] == ITEM_OWNER_GROUP)
  11.         {
  12.             format(string, sizeof(string), "%s\n%d\t\t%s\t\t%d sztuk\t\t$%d", string, Item[i][iUID], Item[i][iName], Item[i][iValue], Item[i][iPrice]);
  13.             temp++;
  14.         }
  15.     }
  16.     if(temp != 0) ShowPlayerDialog(playerid, DIALOG_BUY_PRODUCT, DIALOG_STYLE_LIST, "[Produkt] Kup", string, "kup", "Zamknij");
  17.     else ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_LIST, "[Produkt] Kup", "Brak produktów.", "Zamknij", "");
  18.     return 1;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement