Welcome to Revival Servers!

Welcome to Revival. The forums is an important aspect of joining the Community. This is where you can meet other community members, apply for staff, provide suggestions and participate in many other activities.

Lucky's Programmer Application (Posted for him)

Better Soap

Hollowed
Head Developer
Joined
Apr 7, 2020
Messages
23
Points
3
Age
21
General Questions


Name: Lucky


SteamID: STEAM_0:1:94340989


Age: 16


Timezone: EST


When did you join Revival?: July 23rd 2020


Please tell us a little bit about yourself, how you came to Revival and how you began your Development journey:

I joined Revival from a discord invite in the Clay Knight Gaming Discord. I began my Development journey in the 3rd Grade when I found Khan Academy's Intro to JS course. Looking back on it, its not a very good course at all but it sparked something in me; I became fascinated in learning Programming Languages and furthering my programming skills. Last year I learned Lua for a Roblox project I was making (yeah dumb, I know). During the winter I picked up GLua and haven't stopped programming since!

Why should we pick you to join our Development Team?:

My activity, experience, and professionalism are the reason why I should be picked for the Revival Development Team. Throughout my time developing, I averaged between 3-4 hours per day in development times. Obviously, over the summer my hours are more flexible and are longer. I have an extensive background developing not only in Lua, but several other programming languages as well. (My full portfolio can be found here: https://docs.google.com/document/d/13o6FDzB0RlDSJo3Ebrqdw6lU9J62Ve-yrLMXpDn5E98/edit?usp=sharing). My dedication to professionalism and tasks at hand allows me to be a better dev and a more efficient team member. By allowing me on the team I would not only add value to learning but improve efficiency and create a better workflow.

Why do you want to join the Revival Servers Development Team?:

Throughout my various tenures on Staff and Development Teams I have met many amazing people and even better friends. I was saddened by the news of CKG's (Clay Knight Gaming) closure. By joining this team I would respark my own passion for gMod and gLua.

[Hook Library]

Please provide an example of a PlayerInitialSpawn hook for when a new player joins the server for the very first time, a message prints to everyone's chat saying “Hey, (NewPlayersName - NewPlayersSteamID) has just joined and is new to the server! Say Hi and feel free to show them around!”:

hook.Add( PlayerInitialSpawn, testSpawn, function( player )
for _, ply in pairs( player.GetAll() ) do
ply:ChatPrint( "Hey, (" .. player:Nick() .. " - " .. player:SteamID() .. ") has just joined and is new to the server! Say Hi and feel free to show them around!")
end
end )

Please provide an example of a PlayerSay hook for when a player of a certain UserGroup of your choosing types a specific message with a prefix of “>” in chat the model of the player will change to any model of your choosing, gives the player a physgun, toolgun, grants them godmode and puts the player into noclip instantly:

hook.Add( PlayerSay, testCommand, function( ply, text, isTeam )
if !( ply:GetUserGroup() == "superadmin") then return end
if ( !isTeam ) then
nText = string.sub( text, 1, 7) // >staff
if ( nText == ">staff" ) then
ply:SetModel( "models/props_c17/FurnitureChair001a.mdl" )
ply:Give( "weapon_physgun" )
ply:Give( "gmod_tool" )
ply:GodEnable()
ply:ConCommand( "ulx noclip" )
end
end
end )

[Derma Library]

Please provide an example of a panel which opens using a KeyPressed hook, only the gmod default Admin rank can access this panel, once open there should be a DTextEntry box where the player must input their name, under the box there should be a DCheckBox which should contain 2 options. 1st option - “Check-In”, 2nd option - “Check-Out”, create a DButton under the DCheckBox that simply says “Save”, each input from the DTextEntry and DCheckBox shall be saved to another panel once the DButton has been clicked. (Refer to the next question once completed):

See Next Question!

Please provide an example of an extra DPanel as an extension to the question above, this panel should contain either a DScrollPanel or DListView that lists each persons input from the DTextEntry and DCheckBox, only superadmin can access this menu by using a chat command of your choosing:

hook.Add( KeyPress, testPanel, function( ply, key )
if (key == IN_ZOOM) then
if ( ply:GetUserGroup() == "admin") then
local frame = vgui.Create( "DPanel")
frame:Center()
frame:MakePopup()
frame:SetSize(300, 250)

local TextEntry = vgui.Create( "DTextEntry", DPanel)
TextEntry:SetPos(25, 50)
TextEntry:SetValue( "Enter Username")
TextEntry.OnEnter = function( text )
TextEntry:SetValue( text )
end

local box = vgui.Create( "DCheckBoxLabel", frame)
box:SetPos( 25, 20 )
box:SetText( "Check Out!" )
function box:OnChange( val )
if val then
box:SetText( "Check In!" )
else
box:SetText( "Check Out!" )
end
end

local button = vgui.Create("DButton", frame)
button:SetText( "Save!" )
button:SetPos( 25, 0 )
button:SetSize(250 , 30)
button.DoClick = function()
// Save bText to new Panel
if box:GetValue() then
bText = (TextEntry:GetValue() .. " - Has Checked In")
else
bText = (TextEntry:GetValue() .. " - Has Checked Out")
end
local f = file.Open( "/testaddon/list.txt", "w", "DATA" )
f:Write( bText .. "\n")
f:Close()
end
end
end
end)

hook.Add( PlayerSay, testCommand, function( ply, text, isTeam )
if !( ply:GetUserGroup() == "superadmin") then return end
if ( !isTeam ) then
nText = string.sub( text, 1, 7) // >staff
if ( nText == ">panel" ) then
local frame = vgui.Create("DPanel")
frame:Center()
frame:MakePopup()
frame:SetSize(300, 250)

local panel = vgui.Create( "DScrollPanel", frame )
panel:Dock( FILL )

local f = file.Open( "/testaddon/list.txt", "r", "DATA" )
bText = f:ReadLine()
while (bText != "") do
local DButton = panel:Add( "DButton" )
DButton:SetText( bText )
DButton:Dock( TOP )
DButton:DockMargin(0, 0, 0, 5)
bText = f:ReadLine()
end
end
end
end )

[Entities]

Please provide an example of a custom entity using all 3 default files, clientside, shared and serverside, this entity will be any model of your choosing, once a player presses E on this entity using ENT:Use() it will open a DFrame (make sure you show your networking), this DFrame will contain 3 DPanels, 1 DPanel will contain a Health boost, 1 DPanel will contain an armor boost and 1 DPanel will contain a weapon boost, you will need to use dmginfo() for this, each DPanel will contain 1 button and once the player clicks on one of the buttons it will give them the boost from that DPanel temporarily, set up a timer that will remove the boost once the timer has finished, set up a check to see if the player has used this entity and create a timer for when the player can use the entity again:

Client Networking For Panels
if ( self:GetNetworkedBool( "panel" ) ) then
local frame = vgui.Create( "DPanel" )
frame:SetSize( 300, 250 )
frame:Center()
frane:MakePopup()

local button = vgui.Create( "DButton", DPanel )
button:SetText("Health Boost")
button:SetPos( 25, 60 )
button:SetSize( 250, 20 )
button:DoClick = function()
LocalPlayer:SetHealth( LocalPlayer:GetMaxHealth() + 25 )
LocalPlayer:SetMaxHealth( LocalPlayer:Health())
end

local button1 = vgui.Create( "DButton", DPanel )
button1:SetText("Armor Boost")
button1:SetPos( 25, 40 )
button1:SetSize( 250, 20 )
button1:DoClick = function()
LocalPlayer:SetArmor( LocalPlayer:Armor() + 25 )
end

local button2 = vgui.Create( "DButton", DPanel )
button2:SetText("Damage Boost")
button2:SetPos( 25, 20 )
button2:SetSize( 250, 20 )
button2:DoClick = function()
// Increase Damage
end
end

cl_init.lua
include ( 'shared.lua' )

function ENT:Draw()
self:DrawEntityOutline( 1.0 )
self:DrawModel()

end

init.lua
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )

include ( 'shared.lua' )

function ENT:SpawnFunction(ply, tr)
if (!tr.HitWorld) then return end

local ent = ents.Create("testent")
ent:SetPos(tr.HitPos + Vector(0, 0, 50))
ent:Spawn()

return ent
end

function ENT:Initialize()

self:SetModel( "models/props_interiors/BathTub01a.mdl" )
self:physicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )


local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
end

function ENT:Use( ply, caller )
if ( self:GetNetworkedBool( "panel" )) then
self:SetNetworkedBool( "panel", true)
else
self:SetNetworkedBool( panel, false)
end
end

shared.lua
ENT.Type = "anim"
ENT.Base = "base_gmodentity"

ENT.PrintName = "Test Ent"

Please provide an example of a PlayerDeath hook for when a player dies it will print to that players chat the name of the killer, the killers SteamID and the time of the death, also include if the player who died used a kill command then print to their chat saying they used a suicide command

hook.Add( PlayerDeath, testDeath, function( ply, infl, ent )
if ( ply == ent ) then
PrintMessage( HUD_PRINTTALK, ply:Name() .. " Commited suicide")
else
PrintMessage( HUD_PRINTTALK, ply:Name() .. "Was Killed By " .. ent:Name() .. " - " .. ent:SteamID() .. " At " .. RealTime())
end
end)

Disclaimers


Do you understand that any and all work requested by the Server Manager, Lead Developer or Owner is property of Revival Servers unless stated otherwise?: Yes


Do you understand that you will be under watch and all work provided will be checked by the Lead Developer before pushing to the server?: Yes


Do you understand that you will not be given access to any of the main servers and only the Dev servers?: Yes


Do you agree to be frequently active on the Discord and Teamspeak?: Yes

(You don’t need to be active on any of the game servers.)


Do you understand that Developers are not granted superadmin on the main servers: Yes
 
Top