Rat32 Posted May 9, 2015 Share Posted May 9, 2015 tablicapremii = {"Roadtrain", "Tanker", "Linerunner"} czypremiakon = getVehicleName(czypremia) if getVehicleName(czypremia) == tablicapremii then givePlayerMoney(client, 10000) Why this "if" not read the "tablicapremii" table? Please help . Link to comment
John Smith Posted May 9, 2015 Share Posted May 9, 2015 if tablicapremii[czypremiakon] then Edit:_ not sure about above thing Try looping through table and compare value with czy thing like for i,value in pairs(tablicapremii) do if value == czypremiakon then -- your code of money here Link to comment
Rat32 Posted May 9, 2015 Author Share Posted May 9, 2015 I have vehicle "Roadtrain", but script don't give money too. Link to comment
John Smith Posted May 9, 2015 Share Posted May 9, 2015 tablicapremii = { ["Roadtrain"] = true, ["Tanker"] = true, ["Linerunner"] = true, } czypremiakon = getVehicleName(czypremia) if tablicapremii[czypremiakon] then givePlayerMoney(client, 10000) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now