Hello all, I am making a gamemode for a friend, and the above error comes up. HALP?
Here is my code:
init.lua:
[CODE]AddCSLuaFile( "shared.lua" )
AddCSLuaFile( "cl_init.lua" )
include( "shared.lua" )
function GM:PlayerInitialSpawn( ply )
ply:SetTeam( 1 )
ply:Give( "pistol" )
ply:GiveAmmo( 100, "pistol" )
end
function GM:PlayerSpawn( ply )
ply:SetTeam( 1 )
ply:Give( "pistol" )
ply:GiveAmmo( 100, "pistol" )
end
function GM:PlayerLoadout( ply )
end[/CODE]
shared.lua:
[CODE]GM.Name = "badmoney"
GM.Author = "HERPS THE DERPS"
GM.Email = "LULZ@LULZ.LULZ"
GM.Website = "www.LULZ.co.uk.edu.org.com"
GM.TeamBased = true
team.SetUp(1, "Player", Color(125, 125, 125, 255))[/CODE]
cl_init.lua:
[CODE]include( "shared.lua" )
local function buy_list()
local menu = vgui.Create( "DFrame" )
menu:SetPos(ScrH() / 2, ScrW() / 2)
menu:SetSize( 400, 400 )
menu:SetVisible( true )
menu:SetDraggable( true )
menu:ShowCloseButton( true )
menu:MakePopup()
end
concommand.Add( "buy", buy_list )[/CODE]
THANKYOU SO MUCH TO ALL!!!
-- Kimzey
It's because you're attempting to run cl_init.lua serverside.
[QUOTE=ms333;39731360]It's because you're attempting to run cl_init.lua serverside.[/QUOTE]
Well that's helpful and all, but how do I make it client side? Or whatever I need to do to fixx it?
Still no help, anyone, please??? I need more information on how to fix this!
Still need halp!
If you don't know how to fix such an issue, you shouldn't be making a gamemode for your friend.
Server: The function(s) can only run on the server.
Client: The function(s) can only run on the client.
[url]http://wiki.garrysmod.com/page/States[/url]
Sorry, you need to Log In to post a reply to this thread.