- Initiateur de la discussion
A
AnnibalExHD
Geek
- Messages
- 52
- Score réaction
- 1
- Points
- 90
Code:
local bhop = vgui.Create( "DButton", melon )
bhop:SetParent(prop)
bhop:SetText( "BHOP" )
bhop:SetTextColor( Color(44, 62, 80) )
bhop:SetPos( 115, 270 )
bhop:SetSize( 68, 24 )
bhop.Paint = function()
surface.SetDrawColor( 236, 240, 241 )
surface.DrawRect( 0, 0, bhop:GetWide(), bhop:GetTall() )
end
bhop.DoClick = function() surface.PlaySound("garrysmod/content_downloaded.wav")
CreateClientConVar("bunnyhop", 1, true, false)
function Bunnyhop() if GetConVar("bunnyhop"):GetInt() == 1 then if input.IsKeyDown(KEY_SPACE) then if LocalPlayer():IsOnGround() then RunConsoleCommand("+jump") timer.Create("Bhop", 0, 0.01, function() RunConsoleCommand("-jump") end end end
end
hook.Add("Think", "Bunnyhop", Bunnyhop )
bhop.DoClick = function()
if (isBhop == 0) then -- ACTIVER LE BHOP) isBhop = 1
else --DESACTIVER BHOP isBhop = 0
end
if buttonColored == false then buttonColored = true bhop.Paint = function(self,w,h) draw.RoundedBox(0, 0, 0, w, h, Color( 1, 255, 146, 255 ) ) end else buttonColored = false bhop.Paint = function(self,w,h) draw.RoundedBox(0, 0, 0, w, h, Color( 236, 240, 241, 255 ) ) end end
end
')' expected (to close '(' at line 498) near 'end'