
Originally Posted by
WubzyTheWubzy
I made a simple script for you guys on MPGH that don't like everyone elses nice work.
(Edit) I have been on MPGH since '13 but still don't know why I cant post links, is it cause of post count? ~autism~
Code:
/*
This is a Simple Fucking Script Made By Wubzy, If you want to fucking copy it, Great, I Don't Give A Shit.
*/
-- WELCOME --
local ply = LocalPlayer()
chat.AddText( Color( 255, 0, 10 ), "[Simple Script]", Color( 255, 255, 255 ), "Welcome Back ", Color( 0, 0, 255 ), ply )
surface.PlaySound("coach/coach_defend_here.wav")
CreateClientConVar( "s_esp", 0, true, false )
local function s_esp()
if tobool( GetConVarNumber( "s_esp" ) ) then
for k,v in pairs( player.GetAll() ) do
if LocalPlayer() then
local pos = ( v:GetShootPos() + Vector( 0, 0, 30 ) ):ToScreen()
draw.SimpleTextOutlined( v:Nick(), "Default", pos.x, pos.y -3, Color( 255, 0, 255, 255 ), 1, 1, 1 Color( 0, 0, 255, 255) )
end
end
end
end
hook.Add( "HUDPaint", "s_esp", s_esp )
------------------------------
if ( fb ) then _G.fame = nil end
fb = {}
function fb:newcvar( Name, Str )
print( "Loaded Convar: " ..Name.. "!" )
local beep = Sound( "/buttons/button17.wav" )
local beepsound = CreateSound( LocalPlayer(), beep )
beepsound:Play()
CreateClientConVar( Name, Str, true, false )
end
function fb:cvar( ConVar )
return GetConVarNumber( ConVar )
end
fb:newcvar( "s_bhop", 1 )
function Bunnyhop( cmd, u )
if fb:cvar( "s_bhop" ) == 1 then
if !LocalPlayer():IsOnGround() then
cmd:SetButtons( bit.band( cmd:GetButtons(), bit.bnot( IN_JUMP ) ) )
end
end
end
hook.Add( "CreateMove", "Bunnyhop", Bunnyhop )
Look up for what I have highlighted in red:
chat.AddText( Color( 255, 0, 10 ), "[Simple Script]", Color( 255, 255, 255 ), "Welcome Back ", Color( 0, 0, 255 ),
ply )
- You're trying to print userdata/a metatable, do ply:Nick() or ply:Name() if you want to print the name.
for k,v in
pairs( player.GetAll() ) do
- Instread of this (it can causes lags) do:
local players = player.GetAll()
for k = 1,
#players do
local v = players[k]
hook.Add( "CreateMove",
"Bunnyhop", Bunnyhop )
- Make a function to create RANDOM hook names
local pos = (
v:GetShootPos() + Vector( 0, 0, 30 ) ):ToScreen()
- If you plan to place it over the player head use OBBMaxs (or EyePos)
if LocalPlayer() then
- What you mean is probably: if v != LocalPlayer() then
Some tips:
- Use _G: Well, make a copy of it then call it everywhere.
- Use _R.Player.Nick( ply ) to get the player name.
- Use _R.Entity.GetPos( ply ) to get the player pos. Remplace GetPos with anything else like GetClass, etc...