DjNaste85 0 Posted September 12, 2019 I'm interested in writing a script that would allow a trader/s, for example Black Market Trader to be the only available sell point for certain items. Excluding or blacklisting the selected traders from being able to sell a (item_x) for a player if not listed. Ive searched online for all the information i could but nothing really defines this function/script I'm trying to create plus being a noob doesn't help either, lol. If someone out there has the knowledge on how i would go about this could you please help me out. As of now i have a Black Market Trader and Farming on my server but the items from farming i would like them only to be sold at the Black Market Trader. As of now your able to sell them at all traders, how can i fix this or can someone direct me into the right path to writing a script for this to add into the server to prevent those items from being sold at the other available traders UNLESS its a Black Market. How would i go about getting this added? List of items ``` "DDR_Item_Mushrooms", "DDR_Item_Drugs_Weed", "DDR_Item_Silver_Ore", "DDR_Item_Gold_Ore", "DDR_Item_Crystal_Purple", "DDR_Item_Crystal_Green" ``` Share this post Link to post Share on other sites
wogz187 1085 Posted September 13, 2019 @DjNaste85, Where did your script come from and what does it look like? It could be as easy as adding a couple conditions. Or it could be super-difficult. We'll never know if we can't see. Share this post Link to post Share on other sites
DjNaste85 0 Posted September 13, 2019 @wogz187 well see there's the problem im new to scripting and im looking for some help or insight on how to add this in. As of now were running a exile server and i have no script written, but wanted to know if this was possible as you've already answered which is great news to hear. The main sqf for selling items is here: https://sqfbin.com/tapuvehazitaguyunipe Trader Class and Name: https://sqfbin.com/horukiguxidufibumama Trader Items: /////////////////////////////////////////////////////////////////////////////// //Black Market /////////////////////////////////////////////////////////////////////////////// class DDR_Item_Mushrooms { quality = 1; sellPrice = 480; }; class DDR_Item_Drugs_Weed { quality = 1; sellPrice = 240; }; class DDR_Item_Crystal_Purple { quality = 1; sellPrice = 500; }; class DDR_Item_Crystal_Green { quality = 1; sellPrice = 500; }; class DDR_Item_Gold_Ore { quality = 1; sellPrice = 100; }; class DDR_Item_Silver_Ore { quality = 1; sellPrice = 100; }; }; I do know the main sqf is for all the traders in the exile server so im assuming if i change something there it would effect all the traders even the black market unless its possible to add in a exception not sure 😕 looking for the knowledge😉 I know what i want to do just don't have the knowledge or experience, thanks for your help in advance! FYI your talking to a noob😀 Share this post Link to post Share on other sites
wogz187 1085 Posted September 13, 2019 @djnaste, You want to filter the inventory of merchants based on their class. Is that right? So a black-market class merchant will sell the illicit items in the block above but legit merchants will not trade those items. I'm not qualified to help write the code with you. If you hang out around the EXILE discord awhile I bet you will find the person who is qualified. It's definitely do-able. Have fun! Share this post Link to post Share on other sites
DjNaste85 0 Posted September 14, 2019 @wogz187 Thanks! Share this post Link to post Share on other sites