Author Topic: Garry's Mod  (Read 1558 times)

0 Members and 1 Guest are viewing this topic.

xSpartaNx MyK

  • Poptart
  • *
  • Posts: 4
    • View Profile
Garry's Mod
« on: August 07, 2008, 09:33:14 pm »
If there's anyone on this forum familiar with a Garry's Mod gamemode called Tacoscript, I'd like to know how you could hack it and be able to do things like spawn weapons and add tokens, etc. I have a copy of the script in a .rar if anyone would like to see it. (It is a private script though, and I'm not sure how my buddy came across it :icon_laugh). I think its made mostly of LUA files, but I don't really know anything about that...

Thanks for all the help guys  :icon_biggrin2

[TKC]Wesker

  • ArmA's Most Wanted
  • The Central Committee
  • Master Heckler
  • *
  • Posts: 2209
  • The Illusive Man
    • View Profile
    • TKC Tube
Re: Garry's Mod
« Reply #1 on: August 08, 2008, 04:46:31 pm »
Hello, I don't play Gmod much these days but I would be interested in having a look.
I have picked up from LUA script packs in my time (from myg0t forums) but they only seem to work on servers that allow user scripts (not many).
Mark me if I'm wrong.

The Illusive Man

xSpartaNx MyK

  • Poptart
  • *
  • Posts: 4
    • View Profile
Re: Garry's Mod
« Reply #2 on: August 08, 2008, 11:57:08 pm »
Well, I'm mostly trying to get to do  what admins can do without actually having my SteamID on the server's users.txt.
« Last Edit: August 10, 2008, 07:55:08 am by xSpartaNx MyK »

coke

  • Cheater Apprentice
  • *
  • Posts: 11
    • View Profile
Re: Garry's Mod
« Reply #3 on: March 12, 2011, 12:23:37 am »
Bumping this as I am also interested.

It uses Lua which I've heard is easy shit.

Gamemode:
http://www.dramaunlimited.org/release/Tacoscript-08.09.rar

GMod Wiki with functions and shit:
http://wiki.garrysmod.com/?title=Main_Page

joopig

  • Insane Joker
  • ****
  • Posts: 602
    • View Profile
    • A Place Of Dreams
Re: Garry's Mod
« Reply #4 on: April 15, 2011, 05:29:08 pm »
You want to be careful though as most if not all servers are vac protected now.

s0beit

  • Relentless Teamkiller
  • **
  • Posts: 94
    • View Profile
Re: Garry's Mod
« Reply #5 on: May 30, 2011, 11:42:34 pm »
VAC protection does _nothing_ against lua scripts, script enforcer bypassing can get you banned, but not Lua scripts themselves.

I wrote this a while ago but it still works like a charm
Code: [Select]
--[[
Name: s0beit.lua
Product: Client-side LUA hook
Author: s0beit
]]--

--Start of config
local s0beitEspCvar = CreateClientConVar( "s0beit_esp", 1, true, false )
local s0beitCroCvar = CreateClientConVar( "s0beit_xhair", 0, true, false )
--End of config

local function HeadPos(ply)
    if ValidEntity(ply) then
        local hbone = ply:LookupBone("ValveBiped.Bip01_Head1")
        return ply:GetBonePosition(hbone)
    else return end
end

local function Visible(ply)
    local trace = {start = LocalPlayer():GetShootPos(),endpos = HeadPos(ply),filter = {LocalPlayer(), ply}}
    local tr = util.TraceLine(trace)
    if tr.Fraction == 1 then
        return true
    else
        return false
    end     
end

local function IsSteamFriend( ply )
    return ply:GetFriendStatus() == "friend"
end

local function FillRGBA(x,y,w,h,col)
    surface.SetDrawColor( col.r, col.g, col.b, col.a );
    surface.DrawRect( x, y, w, h );
end

local function OutlineRGBA(x,y,w,h,col)
    surface.SetDrawColor( col.r, col.g, col.b, col.a );
    surface.DrawOutlinedRect( x, y, w, h );
end

local function DrawCrosshair()
    local w = ScrW() / 2;
    local h = ScrH() / 2;
     
    FillRGBA( w - 5, h, 11, 1, Color( 255, 0, 0, 255 ) );
    FillRGBA( w, h - 5, 1, 11, Color( 255, 0, 0, 255 ) );
end

function DrawESP()
    if s0beitEspCvar:GetInt() == 1 then
        for k, v in pairs(ents.GetAll()) do
            if( ValidEntity(v) and v ~= LocalPlayer() ) then
                if( v:IsNPC() ) then
                    local drawColor = Color(255, 255, 255, 255);
                    local drawPosit = v:GetPos():ToScreen();
                     
                    if( Visible(v) ) then
                        drawColor = Color( 255, 0, 0, 255 );
                    else
                        drawColor = Color( 0, 255, 0, 255 );
                    end
                     
                    local textData = {}
                     
                    textData.pos = {}
                    textData.pos[1] = drawPosit.x;
                    textData.pos[2] = drawPosit.y;
                    textData.color = drawColor;
                    textData.text = v:GetClass();
                    textData.font = "DefaultFixed";
                    textData.xalign = TEXT_ALIGN_CENTER;
                    textData.yalign = TEXT_ALIGN_CENTER;
                    draw.Text( textData );
                     
                elseif( v:IsPlayer() and v:Health() > 0 and v:Alive() ) then
                    local drawColor = team.GetColor(v:Team());
                    local drawPosit = v:GetPos():ToScreen();
                     
                    if( Visible(v) ) then
                        drawColor.a = 255;
                    else
                        drawColor.r = 255 - drawColor.r;
                        drawColor.g = 255 - drawColor.g;
                        drawColor.b = 255 - drawColor.b;
                    end
                     
                    local textData = {}
                     
                    textData.pos = {}
                    textData.pos[1] = drawPosit.x;
                    textData.pos[2] = drawPosit.y;
                    textData.color = drawColor;
                    textData.text = v:GetName();
                    textData.font = "DefaultFixed";
                    textData.xalign = TEXT_ALIGN_CENTER;
                    textData.yalign = TEXT_ALIGN_CENTER;
                     
                    draw.Text( textData );
                     
                    local max_health = 100;
                     
                    if( v:Health() > max_health ) then
                        max_health = v:Health();
                    end
                     
                    local mx = max_health / 4;
                    local mw = v:Health() / 4;
                     
                    local drawPosHealth = drawPosit;
                     
                    drawPosHealth.x = drawPosHealth.x - ( mx / 2 );
                    drawPosHealth.y = drawPosHealth.y + 10;
                     
                    FillRGBA( drawPosHealth.x - 1, drawPosHealth.y - 1, mx + 2, 4 + 2, Color( 0, 0, 0, 255 ) );
                    FillRGBA( drawPosHealth.x, drawPosHealth.y, mw, 4, drawColor );
                end
            end
        end
    end
end

function DrawXHair()
    if( s0beitCroCvar:GetInt() == 1 ) then
        DrawCrosshair();
    end
end

hook.Add( "HUDPaint", "DrawESP", DrawESP );
hook.Add( "HUDPaint", "DrawXHair", DrawXHair ); 

Simple ESP and crosshair