Dark Matter Role Play Forums
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Welcome to Dark Matter RP Forums! [Most recent update: 6/26/14]

Share | 
 

 Local Host Coding?

Go down 
AuthorMessage
scratchyentree6
Founder
avatar

Posts : 108
Reputation : 1
Join date : 2014-03-14
Age : 18
Location : United States

PostSubject: Local Host Coding?   Sat Apr 12, 2014 10:58 am

If anyone knows some lua or Javascript please put the code in a pastebin down below.
I am kind of compiling some file for a local host (Server hosted on my computer) then transferred later to a real host.
Back to top Go down
View user profile
FunK
Premium Member
avatar

Posts : 888
Reputation : 43
Join date : 2013-05-05
Location : Las Vegas, Nevada

PostSubject: Re: Local Host Coding?   Sat Apr 12, 2014 2:30 pm

I'll enlighten you. Random code:
Code:
GM.Version = "2.5.1"
GM.Name = "DarkRP"
GM.Author = "By Rickster, Updated: Pcwizdan, Sibre, philxyz, [GNC] Matt, Chrome Bolt, FPtje Falco, Eusion, Drakehawke"


DeriveGamemode("sandbox")

AddCSLuaFile("libraries/interfaceloader.lua")
AddCSLuaFile("libraries/modificationloader.lua")
AddCSLuaFile("libraries/disjointset.lua")
AddCSLuaFile("libraries/fn.lua")

AddCSLuaFile("config/config.lua")
AddCSLuaFile("config/addentities.lua")
AddCSLuaFile("config/jobrelated.lua")
AddCSLuaFile("config/ammotypes.lua")

AddCSLuaFile("cl_init.lua")

GM.Config = GM.Config or {}
GM.NoLicense = GM.NoLicense or {}

include("libraries/interfaceloader.lua")

include("config/_MySQL.lua")
include("config/config.lua")
include("config/licenseweapons.lua")

include("libraries/modificationloader.lua")
include("libraries/fn.lua")
include("libraries/mysqlite/mysqlite.lua")
include("libraries/disjointset.lua")

/*---------------------------------------------------------------------------
Loading modules
---------------------------------------------------------------------------*/
local fol = GM.FolderName.."/gamemode/modules/"
local files, folders = file.Find(fol .. "*", "LUA")
for k,v in pairs(files) do
   if DarkRP.disabledDefaults["modules"][k] then continue end

   include(fol .. v)
end

for _, folder in SortedPairs(folders, true) do
   if folder == "." or folder == ".." or DarkRP.disabledDefaults["modules"][folder] then continue end

   for _, File in SortedPairs(file.Find(fol .. folder .."/sh_*.lua", "LUA"), true) do
      AddCSLuaFile(fol..folder .. "/" ..File)

      if File == "sh_interface.lua" then continue end
      include(fol.. folder .. "/" ..File)
   end

   for _, File in SortedPairs(file.Find(fol .. folder .."/sv_*.lua", "LUA"), true) do
      if File == "sv_interface.lua" then continue end
      include(fol.. folder .. "/" ..File)
   end

   for _, File in SortedPairs(file.Find(fol .. folder .."/cl_*.lua", "LUA"), true) do
      if File == "cl_interface.lua" then continue end
      AddCSLuaFile(fol.. folder .. "/" ..File)
   end
end

MySQLite.initialize()

DarkRP.DARKRP_LOADING = true
include("config/jobrelated.lua")
include("config/addentities.lua")
include("config/ammotypes.lua")
DarkRP.DARKRP_LOADING = nil

DarkRP.finish()
Back to top Go down
View user profile http://darkmatterrp.weebly.com
 
Local Host Coding?
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Dark Matter RP :: General :: Random Discussion-
Jump to: