summaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/common_plantable.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/itemsystem/common_plantable.lua')
-rw-r--r--gamemode/itemsystem/common_plantable.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/gamemode/itemsystem/common_plantable.lua b/gamemode/itemsystem/common_plantable.lua
index b0ef3dc..3754f73 100644
--- a/gamemode/itemsystem/common_plantable.lua
+++ b/gamemode/itemsystem/common_plantable.lua
@@ -18,7 +18,7 @@ local function plant(player, resourcename)
assert(tbl.GrowTime != nil,tbl.Name .. " .GrowTime is nil!")
assert(isfunction(tbl.OnGrow),tbl.Name .. " .OnGrow is not a table")
- if(player:GetNWInt("plants") > GetConVar("gms_PlantLimit")) then
+ if(player:GetNWInt("plants") > GetConVar("gms_PlantLimit"):GetInt()) then
player:SendMessage( "You man only have " .. GetConVar("gms_PlantLimit") .. " plants at a time.", 3, Color( 10, 200, 10, 255 ) )
return
end
@@ -30,7 +30,7 @@ local function plant(player, resourcename)
end
//Everything is good, make the plant
- ply:SetNWInt( "plants", ply:GetNWInt( "plants" ) + 1 )
+ player:SetNWInt( "plants", player:GetNWInt( "plants" ) + 1 )
local pent = ents.Create("gms_generic_plantable")
pent:SetPos(tr.HitPos)
pent.GrowTime = tbl.GrowTime