chaingun427 Posted June 6, 2014 Report Share Posted June 6, 2014 they do, ive removed this for now i'll try to work on it more after I finishe configuring my tow/lift scripting. EDIT: I noticed that on my server_traders the trader is entered as menu_RU_Policeman should that be how it's put into this file? Link to comment Share on other sites More sharing options...
chaingun427 Posted June 6, 2014 Report Share Posted June 6, 2014 It truly is unfortunate that this script doesn't use the trader items and prices already set in the database. The hassle alone of having to add any custom items, and match up trader prices, especially if the server has a customized economy, is enough for me not to bother with this script. Don't get me wrong, it's an awesome concept, and yes, definitely makes the players lives a lot easier, but the simple fact that it could take hours of setup for me, the server admin, completely turns me off. Maybe look into doing a database lookup in the traders_data table for the item and item price instead of setting it in your script. For any server admin who has a custom economy and has customized prices on items, this would save A LOT of setup time. There is a SQL split function posted earlier that does take about half of the work out of setting up prices. Mine created 4 entries for everything but I can't be sure I did everything right either. I'd agree though that a tool to pull trader names, the class names of the items they sell, and the prices and automatically drop them into a file would be key to making this a widespread and easy to use tool. Link to comment Share on other sites More sharing options...
Csus Posted June 6, 2014 Author Report Share Posted June 6, 2014 EDIT: I noticed that on my server_traders the trader is entered as menu_RU_Policeman should that be how it's put into this file? No, you don't need the '_menu' part on there. Link to comment Share on other sites More sharing options...
3steN8igall Posted June 6, 2014 Report Share Posted June 6, 2014 i tested this script and it works fine and i think my player gonna love it. but there's one thing that bothers me...... no humanity check. it is now possible to sell your weapons as hero at the bandit dealer the buy menu is still blocked (your humanity is to blablabla...), but the "trade from vehicle" is shown and works Link to comment Share on other sites More sharing options...
Csus Posted June 6, 2014 Author Report Share Posted June 6, 2014 i tested this script and it works fine and i think my player gonna love it. but there's one thing that bothers me...... no humanity check. it is now possible to sell your weapons as hero at the bandit dealer the buy menu is still blocked (your humanity is to blablabla...), but the "trade from vehicle" is shown and works i'll implement this ASAP Link to comment Share on other sites More sharing options...
Csus Posted June 6, 2014 Author Report Share Posted June 6, 2014 updated the files, can now use a humanity restriction on traders. check documentation.txt or the default init.sqf to see how to implement the humanity requirement on your existing init.sqf Link to comment Share on other sites More sharing options...
3steN8igall Posted June 7, 2014 Report Share Posted June 7, 2014 updated the files, can now use a humanity restriction on traders. check documentation.txt or the default init.sqf to see how to implement the humanity requirement on your existing init.sqf wow, that was fast. i tested it and it works correct :) but i found a problem. cars get locked while trading and unlock after it but if your car is empty and you try to trade, it canceled and your car doesn't unlocked again Link to comment Share on other sites More sharing options...
Csus Posted June 7, 2014 Author Report Share Posted June 7, 2014 thankyou for telling me this! i'll fix it ASAP! Link to comment Share on other sites More sharing options...
Csus Posted June 7, 2014 Author Report Share Posted June 7, 2014 files updated. for those that just need a fix for the bug mentioned by 3steN8igall just replace your current 'trade.sqf' and 'trade_magazines.sqf' with the new ones. :D Link to comment Share on other sites More sharing options...
3steN8igall Posted June 7, 2014 Report Share Posted June 7, 2014 thx sleep is overrated :lol: Link to comment Share on other sites More sharing options...
Munkeskov Posted June 7, 2014 Report Share Posted June 7, 2014 Awesome script, i got it working on chernarus, and namalsk, but cant get it to work on Lingor, and i think it is because the traders dont have a traderzone, i guess. Is there a workaround for this? Link to comment Share on other sites More sharing options...
Csus Posted June 7, 2014 Author Report Share Posted June 7, 2014 yeah, in your mission.sqm file at around line 1300 you'll see something like this - class Sensors { items=10; class Item0 { position[]={8246.3184,15.544708,15485.867}; activationBy="WEST"; repeating=1; interruptable=1; age="UNKNOWN"; name="Lenz"; expCond="(player distance Lenz) < 50;"; expActiv="TitleText[""Now Entering Trader City Lenzburg"",""PLAIN DOWN""]; canbuild = false;"; expDesactiv="TitleText[""Now Leaving Trader City Lenzburg"",""PLAIN DOWN""]; canbuild = true;"; class Effects { }; }; mine is for napf but the differences are trivial. now find the chunks of code in that section that are to do with your trader cities and make the expActiv and expDesactiv look like mine by puttin the canbuild=true/false on the end of them that should get it working for you :) Link to comment Share on other sites More sharing options...
Munkeskov Posted June 7, 2014 Report Share Posted June 7, 2014 Thank for the fast reply. I didnt have the Class Sensor section, so i just used the one from napf, and changed the names, location and text, and now it is working, thanks :-) Link to comment Share on other sites More sharing options...
Csus Posted June 7, 2014 Author Report Share Posted June 7, 2014 i updated the 'documentation.txt' file to include a few fixes for common problems aswell as the SQL function created by Mugzy. Big big thanks to him for creating that :D gave him the credit he deserves in the 'documentation.txt' file :D Link to comment Share on other sites More sharing options...
fr1nk Posted June 9, 2014 Report Share Posted June 9, 2014 Just installed this morning. Lovely script, Csus :D Link to comment Share on other sites More sharing options...
Mugzy Posted June 9, 2014 Report Share Posted June 9, 2014 Updated the query in my post to include items and filter out dupes. Link to comment Share on other sites More sharing options...
Csus Posted June 9, 2014 Author Report Share Posted June 9, 2014 excellent! nice work :) and thankyou! files updated with the newer SQL function in there :) Link to comment Share on other sites More sharing options...
Mugzy Posted June 10, 2014 Report Share Posted June 10, 2014 Want to hear something funny? After coming up with the SQL scripts and stuff, I just now got this up on our server today :) Link to comment Share on other sites More sharing options...
Csus Posted June 10, 2014 Author Report Share Posted June 10, 2014 oh wow :P atleast you're more prepared for it now :') Link to comment Share on other sites More sharing options...
kingpapawawa Posted June 10, 2014 Report Share Posted June 10, 2014 ran this as a query in navicat.. did i do something wrong? x VARCHAR(255), delim VARCHAR(12), pos INT ) RETURNS VARCHAR(255) RETURN REPLACE(SUBSTRING(SUBSTRING_INDEX(x, delim, pos), LENGTH(SUBSTRING_INDEX(x, delim, pos -1)) + 1), delim, ''); [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'x VARCHAR(255), delim VARCHAR(12), pos INT ) RETURNS VARCHAR' at line 1 Link to comment Share on other sites More sharing options...
Csus Posted June 10, 2014 Author Report Share Posted June 10, 2014 did you include the "" part when you ran the query? Link to comment Share on other sites More sharing options...
Csus Posted June 10, 2014 Author Report Share Posted June 10, 2014 CREATE FUNCTION SPLIT_STR( x VARCHAR(255), delim VARCHAR(12), pos INT ) RETURNS VARCHAR(255) RETURN REPLACE(SUBSTRING(SUBSTRING_INDEX(x, delim, pos), LENGTH(SUBSTRING_INDEX(x, delim, pos -1)) + 1), delim, ''); that's my fault, sorry. when I put that in the files I must have missed the top line. i'll update the files right away! Link to comment Share on other sites More sharing options...
N340 Posted June 13, 2014 Report Share Posted June 13, 2014 having an issue, all looks ok to be but I only see a count to 4 in game and cannot seem to find the error. Is there a limit on how many items you can add? Here is the pastebin of my init http://pastebin.com/tFmKRzQ4 Link to comment Share on other sites More sharing options...
Csus Posted June 13, 2014 Author Report Share Posted June 13, 2014 on line 30 - ["MVD_Soldier_Marksman" at the end of that line, remove the comma ;) took me a while to realise that you were referring to the 'systemChat' lines with the count to four. i just spent 10 minutes being so confused XD Link to comment Share on other sites More sharing options...
N340 Posted June 13, 2014 Report Share Posted June 13, 2014 ok, now I get it to display systemchat = 5 But not 6 Darn it, how many errors do I make. LOL I noticed a 5 after a comma around line 200, but taking that out didnt help. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now