I’m an absolute Newbie to LUA but I know the basic things, how to use commands and classes etc.
So, I tried to write a TINY DarkRP Module that would let people buy for their beloved props, determined by the bouncing radius ( whatever the hell this is ) .
So, theres the module spawnmenu_mod.lua in DarkRP/gamemode/modules:
local function buyProp( ply, mdl ) local cost = math.floor( mdl:BoundingRadius( ) ) if (ply:CanAfford(cost)) then ply:AddMoney(-cost) AddNotify("You bought this prop for "+tostring(cost),NOTIFY_HINT, 8) return true else AddNotify("You can't afford this prop for "+tostring(cost),NOTIFY_ERROR, 8) return false end end hook.Add( "PlayerSpawnProp", "buyProp", buyProp )
Problem: It does absolutely nothing.
Thanks for any help.