• Shipment's + Job's file's error?
    0 replies, posted
I'm trying to do a custom NPC-market that will sell item's and weapon's. I want that NPC show items that your job can access to. Shipment's have struct-value "allowed" that contain index of job's that can access to this shipment/weapon. for k, v in pairs(CustomShipments) do if type(v.allowed) == "table" and table.HasValue(v.allowed, LocalPlayer():Team()) then AddItem(v.model, v.category, v.pricesep, v.amount, v.price, v.name, v.entity) elseif type(v.allowed) == "number" and v.allowed == LocalPlayer():Team() then AddItem(v.model, v.category, v.pricesep, v.amount, v.price, v.name, v.entity) else end end I don't know why, but when i first time start my server, variable "allowed" everytime equal -1. But when i update some of code (make changes to file and save) it's makes equal to 5 (index of TEAM_GUN). Can someone help me?
Sorry, you need to Log In to post a reply to this thread.