Hello Guys !
i can't open the shop appear " Unknown Command "spendpoints" ... :S ( when i click F1 ) i already make this in a serverside ...
I TRY THIS COMMAND
[B]lua_run_cl autorun/client/shop.lua[/B]
and appear this:
[quote]
[LuaCmd:1] '=' expected near <'eof'>
[/quote]
[U][B]Serverside[/B][/U]
[quote]
function GM:ShowHelp( ply )
ply:ConCommand("spendpoints")
end
[/quote]
and the clientside is this shop.lua file
[U][B]Clientside[/B][/U]
[lua]
include( "autorun/shared/shared.lua" )
function PointsMenu()
frame = vgui.Create( "DFrame" )
frame:SetPos( ScrW()/2.38, ScrH()/2.85 ) -- Set the position for the menu to pop up at
frame:SetSize( 300, 280 ) -- Make the second number bigger for a longer list, only if your a dev whos adding more skills.
frame:SetTitle( "Server Skills Menu" ) -- Title of the main panel
frame:SetDraggable( true )
frame:ShowCloseButton( true )
frame:MakePopup()
PropertySheet = vgui.Create( "DPropertySheet", frame )
PropertySheet:SetPos( 5, 30 )
PropertySheet:SetSize( 290, 242 )-- Width and Height, Make the second number bigger, but make sure its always 38 less than the one above
SheetItemOne = vgui.Create("DCollapsibleCategory", DermaPanel)
SheetItemOne:SetPos( 25,50 )
SheetItemOne:SetSize( 300, 75 )
SheetItemOne:SetExpanded( 1 ) -- Expanded when popped up
SheetItemOne:SetLabel( "Server Skills Menu" )
SheetItemOne.Paint = function() -- The paint function
surface.SetDrawColor( 50, 50, 200, 255 ) -- What color ( R, B, G, A )
end
CategoryList = vgui.Create( "DPanelList" )
CategoryList:SetAutoSize( true )
CategoryList:SetSpacing( 5 )
CategoryList:EnableHorizontal( false )
CategoryList:EnableVerticalScrollbar( true )
SheetItemOne:SetContents( CategoryList )
local ply = LocalPlayer()
CategoryContentOne = vgui.Create( "DButton" )
CategoryContentOne:SetText( "Max Hp (Current: "..RP_SQL["HPLvl"].." /30 )" )
CategoryContentOne.DoClick = function()
surface.PlaySound( "ui/buttonclickrelease.wav" )
RunConsoleCommand("skill1buy")
frame:Close()
timer.Simple(0.4, function()
RunConsoleCommand("spendpoints")
end)
end
CategoryList:AddItem( CategoryContentOne )
CategoryContentTwo = vgui.Create( "DButton" )
CategoryContentTwo:SetText( "Max Armor (Current: "..RP_SQL["ArmorLvl"].." /25 )" )
CategoryContentTwo.DoClick = function()
surface.PlaySound( "ui/buttonclickrelease.wav" )
RunConsoleCommand("skill2buy")
frame:Close()
timer.Simple(0.4, function()
RunConsoleCommand("spendpoints")
end)
end
CategoryList:AddItem( CategoryContentTwo )
CategoryContentThree = vgui.Create( "DButton" )
CategoryContentThree:SetText( "Hp Regen (Current: "..RP_SQL["HPRegenLvl"].." /100 )" )
CategoryContentThree.DoClick = function()
surface.PlaySound( "ui/buttonclickrelease.wav" )
RunConsoleCommand("skill3buy")
frame:Close()
timer.Simple(0.4, function()
RunConsoleCommand("spendpoints")
end)
end
CategoryList:AddItem( CategoryContentThree )
CategoryContentThree2 = vgui.Create( "DButton" )
CategoryContentThree2:SetText( "Armor Regen (Current: "..RP_SQL["ArmorRegenLvl"].." /100 )" )
CategoryContentThree2.DoClick = function()
surface.PlaySound( "ui/buttonclickrelease.wav" )
RunConsoleCommand("skill4buy")
frame:Close()
timer.Simple(0.4, function()
RunConsoleCommand("spendpoints")
end)
end
CategoryList:AddItem( CategoryContentThree2 )
CategoryContentFour = vgui.Create( "DButton" )
CategoryContentFour:SetText( "Jump Height (Current: "..RP_SQL["JumpHeightLvl"].." /15 )" )
CategoryContentFour.DoClick = function()
surface.PlaySound( "ui/buttonclickrelease.wav" )
RunConsoleCommand("skill5buy")
frame:Close()
timer.Simple(0.4, function()
RunConsoleCommand("spendpoints")
end)
end
CategoryList:AddItem( CategoryContentFour )
CategoryContentFive = vgui.Create( "DButton" )
CategoryContentFive:SetText( "Damage Resistance (Current: "..RP_SQL["ResistanceLvl"].." /15 )" )
CategoryContentFive.DoClick = function()
surface.PlaySound( "ui/buttonclickrelease.wav" )
RunConsoleCommand("skill6buy")
frame:Close()
timer.Simple(0.4, function()
RunConsoleCommand("spendpoints")
end)
end
CategoryList:AddItem( CategoryContentFive )
CategoryContentSix = vgui.Create( "DButton" )
if(RP_SQL["SpeedLvl"] != nil) then
CategoryContentSix:SetText( "Player Speed (Current: "..RP_SQL["SpeedLvl"].." /15 )" )
end
CategoryContentSix.DoClick = function()
surface.PlaySound( "ui/buttonclickrelease.wav" )
RunConsoleCommand("skill7buy")
pointframe:Close()
timer.Simple(0.4, function()
RunConsoleCommand("spendpoints")
end)
end
CategoryList:AddItem( CategoryContentSix )
PropertySheet:AddSheet("Server Skill Menu", SheetItemOne, "gui/silkicons/shield", false, false, "Server Skills Menu")
end
concommand.Add( "spendpoints", PointsMenu )
[/lua]
Actually it's lua_openscript_cl
lol that was , i do not remember hwo to test that , i already fix the problem thanks :) xD
i was confused because in other post someone put lua_run_cl HAHA ,
Thanks Undefined =)
Sorry, you need to Log In to post a reply to this thread.