Jake Upton IT
Thursday, November 27, 2014
Tuesday, November 18, 2014
Tuesday, November 4, 2014
Nuke TTT and possibly Deathrun Work
I currently have 4 servers, Bunnyhop, Deathrun, Trouble in Terrorist Town and Surf. The Deathrun and the TTT are full of bugs such as guns not making sounds on shooting, and Deathrun has many unwanted addons and unintentional lag. I'll be hopefully fixing and bugs on my servers in the month of November. I plan on completely starting from Scratch on TTT and building from the base gamemode.
Friday, October 31, 2014
J'ai complété toute ma projet.
So I finished it, The pictures have not changed from my last post, but the backend works and now saves the times to a new directory surf_jp_leaderboards/ in the data folder. The clientside menu displays the times that are saved when localplayer isn't wearing a jump pack, which was the intention of all of it.
There was too many functions I made and added, so I'll just provide a pastebin to the files I edited
sv_leaderboards : http://pastebin.com/Qu4D4D7U
cl_leaderboards : http://pastebin.com/kVqXRBFC
sv_ranking : http://pastebin.com/2j01Kts4
cl_surf_hud : http://pastebin.com/f6NYgjRP
sv_timer : http://pastebin.com/Tn2e6KPq
sh_player_timer : http://pastebin.com/19nPkqY9
Yeah, I don't really know what to explain, the SV_leaderboards is the backend for leaderboard saving times etc, the cl_leaderboards is for clientside views, sv_ranking is for end map messages and XP setting, cl_surf_hud is the hud drawing for the rainbow and PB shown on the hud that I did, sv_timer is the mostest backend with new way of saving times was written, and lastly sh_player_timer was edited for PB function checking.
There was too many functions I made and added, so I'll just provide a pastebin to the files I edited
sv_leaderboards : http://pastebin.com/Qu4D4D7U
cl_leaderboards : http://pastebin.com/kVqXRBFC
sv_ranking : http://pastebin.com/2j01Kts4
cl_surf_hud : http://pastebin.com/f6NYgjRP
sv_timer : http://pastebin.com/Tn2e6KPq
sh_player_timer : http://pastebin.com/19nPkqY9
Yeah, I don't really know what to explain, the SV_leaderboards is the backend for leaderboard saving times etc, the cl_leaderboards is for clientside views, sv_ranking is for end map messages and XP setting, cl_surf_hud is the hud drawing for the rainbow and PB shown on the hud that I did, sv_timer is the mostest backend with new way of saving times was written, and lastly sh_player_timer was edited for PB function checking.
Wednesday, October 15, 2014
Backend started
Got a few functions out today
function JumpPackCheck(ply)
if SERVER then
return ply:GetInfoNum("surf_jump_pack", 1) == 1
elseif CLIENT then
return cvars.Number("surf_jump_pack") == 1
end
end
function JumpPackCheck(ply)
if SERVER then
return ply:GetInfoNum("surf_jump_pack", 1) == 1
elseif CLIENT then
return cvars.Number("surf_jump_pack") == 1
end
end
Checks if the player has the jump pack enabled.
function SURF:LetsDetectJP( x, y, text, desc, cvar, p )
surface.SetFont("SURF_MAIN_BUTTON_TITLE")
local _w, _h = surface.GetTextSize(text)
surface.SetFont("SURF_MAIN_BUTTON_DESC")
local __w, __h = surface.GetTextSize(desc)
local c = SURF.MainColors
local w, h = __w > _w and __w+30 or _w+30, _h+__h+10
local butt = surfui.Button( SURF.MainUI, x, y, w, h, p, function( s, w, h )
s.state = GetConVarNumber(cvar)
draw.RoundedBox( 0, 0, h/2-10, 20, 20, c.side )
draw.RoundedBox( 0, 2, h/2-8, 16, 16, c.main )
draw.RoundedBox( 0, 3, h/2-7, 14, 14, s.state == 1 and c.side or c.main )
draw.SimpleText( text, "SURF_MAIN_BUTTON_TITLE", 25, 5, Color( 0, 0, 0, 210 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM )
draw.SimpleText( desc, "SURF_MAIN_BUTTON_DESC", 25, 5+_h, Color( 0, 0, 0, 210 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM )
end)
butt.DoClick = function(s)
if CurTime() > NextAllowedClick then
if GetConVarNumber("surf_jump_pack") == 1 then
RunConsoleCommand("surf_jump_pack", 0)
RunConsoleCommand("say", "/r")
else
RunConsoleCommand("surf_jump_pack", 1)
RunConsoleCommand("say", "/r")
end
NextAllowedClick = CurTime() + 1
end
end
end
Menu Check box. Resets player if it detects a change.
Basically sets the cvar surf_jump_pack to 0 or 1
and puts a 1s delay between button clicks because Garrysmod has a ConVar Speed restriction, so spamming the button would allow you to set a value, without being a reset.
Lastly, little easter egg I made today
if (GetConVarNumber("surf_velocity_color_r") == 1 and GetConVarNumber("surf_velocity_color_g") == 33 and GetConVarNumber("surf_velocity_color_b") == 7) or GetConVarNumber("surf_mlg_hud") == 1 then
color = Color( 255*math.abs(math.sin(CurTime())), 255*math.abs(math.sin(CurTime()+1.8)),255*math.abs(math.sin(CurTime()+2.6)), 255)
else
color = Color( GetConVarNumber("surf_velocity_color_r"), GetConVarNumber("surf_velocity_color_g"), GetConVarNumber("surf_velocity_color_b") )
end
Basically a hud check to see if your colors are 1337 and if they are make them rainbow.
Color( 255*math.abs(math.sin(CurTime())), 255*math.abs(math.sin(CurTime()+1.8)),255*math.abs(math.sin(CurTime()+2.6)), 255)
This is similar to what you probably know as HSVToColor
Lastly, little easter egg I made today
if (GetConVarNumber("surf_velocity_color_r") == 1 and GetConVarNumber("surf_velocity_color_g") == 33 and GetConVarNumber("surf_velocity_color_b") == 7) or GetConVarNumber("surf_mlg_hud") == 1 then
color = Color( 255*math.abs(math.sin(CurTime())), 255*math.abs(math.sin(CurTime()+1.8)),255*math.abs(math.sin(CurTime()+2.6)), 255)
else
color = Color( GetConVarNumber("surf_velocity_color_r"), GetConVarNumber("surf_velocity_color_g"), GetConVarNumber("surf_velocity_color_b") )
end
Basically a hud check to see if your colors are 1337 and if they are make them rainbow.
Color( 255*math.abs(math.sin(CurTime())), 255*math.abs(math.sin(CurTime()+1.8)),255*math.abs(math.sin(CurTime()+2.6)), 255)
This is similar to what you probably know as HSVToColor
Thursday, October 9, 2014
pretty much this
hook.Add("PlayerBindPress", "Surf.NoMovementInLB", function( ply, bind )
if SURF.LBOpen then
SURF.CloseLB()
SURF.CloseJPLB()
end
if SURF.JPLBOpen then
SURF.CloseJPLB()
SURF.CloseLB()
end
if SURF.JPLBOpen and SURF.LBOpen then
SURF.CloseJPLB()
SURF.CloseLB()
end
end)
Fixed the bug from last day. yap
if SURF.LBOpen then
SURF.CloseLB()
SURF.CloseJPLB()
end
if SURF.JPLBOpen then
SURF.CloseJPLB()
SURF.CloseLB()
end
if SURF.JPLBOpen and SURF.LBOpen then
SURF.CloseJPLB()
SURF.CloseLB()
end
end)
Fixed the bug from last day. yap
Subscribe to:
Posts (Atom)