From 615bd55ab4ec3980246e2b49cdb20bfd3180d594 Mon Sep 17 00:00:00 2001 From: AlmTech Date: Sat, 14 Sep 2019 17:00:54 +0200 Subject: [PATCH] Added more stuff --- .../engine/core/server/sv_player_init.lua | 19 ++++++++++++++----- gamemode/engine/derma/cl_main_menu.lua | 15 +++++++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 gamemode/engine/derma/cl_main_menu.lua diff --git a/gamemode/engine/core/server/sv_player_init.lua b/gamemode/engine/core/server/sv_player_init.lua index 2952f17..4f755a8 100644 --- a/gamemode/engine/core/server/sv_player_init.lua +++ b/gamemode/engine/core/server/sv_player_init.lua @@ -10,17 +10,26 @@ Quantum.Server.Player = {} local ply = FindMetaTable( "Player" ) function GM:PlayerInitialSpawn( ply ) - ply.isloaded = true -- REMOVE THIS WHEN MYSQL DB IS ADDED + --ply.isloaded = true -- REMOVE THIS WHEN MYSQL DB IS ADDED + end -function GM:PlayerSpawn( ply ) - - ply:SetModel( "models/player/Group03/male_04.mdl" ) - +local function setUpPlayer( ply ) + if( ply:GetModel() ~= nil ) then ply:SetupHands() else Quantum.Error( tostring(ply) .. " doesn't have a valid model. Unable to set up hands!" ) end Quantum.Debug( tostring( ply ) .. " spawned." ) +end + +function GM:PlayerSpawn( ply ) + + if( !ply.isloaded ) then + ply:Spectate( OBS_MODE_CHASE ) + else + setUpPlayer( ply ) + end + end \ No newline at end of file diff --git a/gamemode/engine/derma/cl_main_menu.lua b/gamemode/engine/derma/cl_main_menu.lua new file mode 100644 index 0000000..046ada7 --- /dev/null +++ b/gamemode/engine/derma/cl_main_menu.lua @@ -0,0 +1,15 @@ +-- __ _ _______ _ __ +-- / / /\ | | |__ __| | | \ \ +-- / / / \ | |_ __ ___ | | ___ ___| |__ \ \ +-- < < / /\ \ | | '_ ` _ \| |/ _ \/ __| '_ \ > > +-- \ \ / ____ \| | | | | | | | __/ (__| | | | / / +-- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/ + +local function mainMenu() + local sw, sh = ScrW(), ScrH() + if( !f ) then + local f = vgui.Create( "DFrame" ) + f:SetTitle( "Main Menu" ) + f:SetSize( sw, sh ) + end +end \ No newline at end of file