Heya Facepunchers!
Kay, so, heres my problem. Im programming a gamemode, where you pay for props, but it wont work.
I have a table that contains the props model, and the props price, the thing is, that it just wont pay the correct price.
If its in the table, it still pays the default price!
Heres my code to get the price, and the table:
[lua]
local DEFAULT_PRICE_PROP = 1 – Prop default price
local propPrices = { [“models/Combine_Helicopter/helicopter_bomb01.mdl”] = 10 } – [“model_name”] = price
function getPropPrice(mdl)
if(!propPrices[mdl] or propPrices[mdl] == nil) then
return DEFAULT_PRICE_PROP
else
return propPrices[mdl]
end
end
[/lua]
Oliver