Navigation Menu

Skip to content

Commit

Permalink
Remove role ( Close #233 )
Browse files Browse the repository at this point in the history
It would be take trouble
  • Loading branch information
Bara committed Nov 28, 2017
1 parent 7088c91 commit ef807f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions addons/sourcemod/scripting/include/ttt_shop.inc
Expand Up @@ -35,11 +35,10 @@ native bool TTT_RegisterCustomItem(const char[] itemshort, const char[] itemlong
*
* @param itemshort The short-tag identifier to find the item.
* @param price The price of the item.
* @param role The optional role to restrict the item to. (Currently unsupported)
* @param sort The priority in Sorting. Buy menu is sorted from high to low.
* @param discount Item discountable for special players? (Required: ttt_shop_discount)
*/
native bool TTT_UpdateCustomItem(const char[] itemshort, int price, int role = 0, int sort = 0, bool discount = false);
native bool TTT_UpdateCustomItem(const char[] itemshort, int price, int sort = 0, bool discount = false);

/*
* Retrieve a custom item's price.
Expand Down
5 changes: 2 additions & 3 deletions addons/sourcemod/scripting/ttt/ttt_shop.sp
Expand Up @@ -568,9 +568,8 @@ public int Native_UpdateCustomItem(Handle plugin, int numParams)
PrintToChatAll("Found: %s", temp_short);

temp_item[Price] = GetNativeCell(2);
// temp_item[Role] = GetNativeCell(3);
temp_item[Sort] = GetNativeCell(4);
temp_item[Discount] = view_as<bool>(GetNativeCell(5));
temp_item[Sort] = GetNativeCell(3);
temp_item[Discount] = view_as<bool>(GetNativeCell(4));

PrintToChatAll("New values... Price: %d, Role: %d, Sort: %d, Discount: %d", temp_item[Price], temp_item[Role], temp_item[Sort], temp_item[Discount]);

Expand Down

0 comments on commit ef807f9

Please sign in to comment.