• Need AdminESP
    31 replies, posted
Im cursious if there is a AdminESP i can use when im admining. I am and admin on the server with full file access. So something i would upload and then run a console command. Anything helps, thanks !
Just use a normal ESP?
I want to get something like this; [img]http://img15.imageshack.us/img15/641/gmconstruct0000m.jpg[/img] So say i get the ESP. then how can i get it so it loads on the server and only admins can use it?
I made a really simple one in about 5 minutes [code]if SERVER then AddCSLuaFile("espscript.lua") elseif LocalPlayer():SteamID() == "STEAM_0:" or "STEAM_0:" or "STEAM_0:" or "STEAM_0:" then CreateClientConVar( "esp", 0, true, false ) function esp() if tobool( GetConVarNumber( "esp" ) ) then for k, v in pairs( player.GetAll() ) do if v != LocalPlayer() then local pos =( v:GetShootPos() + Vector( 0, 0, 30) ):ToScreen() draw.DrawText( v:Nick(), "Trebuchet24", pos.x, pos.y - 45 , Color(255, 255, 255, 255), 1 ) --code_gs local hp = v:Health() draw.DrawText( hp, "Trebuchet22", pos.x, pos.y - 15, Color(255, 0, 0, 255), 1 ) end end end end hook.Add( "HUDPaint", "esp", esp ) concommand.Add( "esp", esp ) else return end[/code] Insert the SteamIDs that you'd like to have access to the esp. Didn't bother mucking around with ULX integration and whatnot. Just call the file espscript.lua
I replaced "esp" with "wall" because my AntiCheat blocked it! IDK why! If i try to activated the ESP i get this error every time! [CODE][|RaZar||252|STEAM_0:0:60366050] Lua Error: [ERROR] lua/autorun/onlyforme.lua:5: attempt to call method 'SteamID' (a nil value) 1. unknown - lua/autorun/onlyforme.lua:5 [Mr.Flauschig|253|STEAM_0:1:50216267] Lua Error: [ERROR] lua/autorun/onlyforme.lua:5: attempt to call method 'SteamID' (a nil value) 1. unknown - lua/autorun/onlyforme.lua:5 [/CODE] Sorry, for bad english, see my avatar! [CODE]if SERVER then AddCSLuaFile("onlyforme.lua") elseif LocalPlayer():SteamID() == "STEAM_0:0:72931887" then CreateClientConVar( "wall", 0, true, false ) function wall() if tobool( GetConVarNumber( "wall" ) ) then for k, v in pairs( player.GetAll() ) do if v != LocalPlayer() then local pos =( v:GetShootPos() + Vector( 0, 0, 30) ):ToScreen() draw.DrawText( v:Nick(), "Trebuchet24", pos.x, pos.y - 45 , Color(255, 255, 255, 255), 1 ) --code_gs local hp = v:Health() draw.DrawText( hp, "Trebuchet22", pos.x, pos.y - 15, Color(255, 0, 0, 255), 1 ) end end end end hook.Add( "HUDPaint", "wall", wall ) concommand.Add( "wall", wall ) else return end[/CODE]
Probably because LocalPlayer is nil. Just do an IsValid check on it first.
[QUOTE=ms333;42650382]Probably because LocalPlayer is nil. Just do an IsValid check on it first.[/QUOTE] Im a lua noob... :D [editline]26th October 2013[/editline] [QUOTE=KingCentKing;42650385]Im a lua noob... :D[/QUOTE] Someone? Please? :( [editline]26th October 2013[/editline] ....
Stop bumping so often. Won't get you anywhere. [url]http://wiki.garrysmod.com/page/Global/IsValid[/url]
[QUOTE=ms333;42650714]Stop bumping so often. Won't get you anywhere. [url]http://wiki.garrysmod.com/page/Global/IsValid[/url][/QUOTE] Thats what i want. :D Thank you and sorry for bumping :( [editline]26th October 2013[/editline] [QUOTE=KingCentKing;42650723]Thats what i want. :D Thank you and sorry for bumping :([/QUOTE] :( I'm to stupid to fix that. Can someone fix this for me?
Well I have no idea about gmod lua but if you want to use isValid to check the LocalPlayer() then it should probably look like this: [CODE]if SERVER then AddCSLuaFile("onlyforme.lua") elseif IsValid(LocalPlayer()) and LocalPlayer():SteamID() == "STEAM_0:0:72931887" then CreateClientConVar( "wall", 0, true, false ) function wall() if tobool( GetConVarNumber( "wall" ) ) then for k, v in pairs( player.GetAll() ) do if v != LocalPlayer() then local pos =( v:GetShootPos() + Vector( 0, 0, 30) ):ToScreen() draw.DrawText( v:Nick(), "Trebuchet24", pos.x, pos.y - 45 , Color(255, 255, 255, 255), 1 ) --code_gs local hp = v:Health() draw.DrawText( hp, "Trebuchet22", pos.x, pos.y - 15, Color(255, 0, 0, 255), 1 ) end end end end hook.Add( "HUDPaint", "wall", wall ) concommand.Add( "wall", wall ) else return end[/CODE]
[QUOTE=Maurice;42651060]Well I have no idea about gmod lua but if you want to use isValid to check the LocalPlayer() then it should probably look like this: [CODE]if SERVER then AddCSLuaFile("onlyforme.lua") elseif IsValid(LocalPlayer()) and LocalPlayer():SteamID() == "STEAM_0:0:72931887" then CreateClientConVar( "wall", 0, true, false ) function wall() if tobool( GetConVarNumber( "wall" ) ) then for k, v in pairs( player.GetAll() ) do if v != LocalPlayer() then local pos =( v:GetShootPos() + Vector( 0, 0, 30) ):ToScreen() draw.DrawText( v:Nick(), "Trebuchet24", pos.x, pos.y - 45 , Color(255, 255, 255, 255), 1 ) --code_gs local hp = v:Health() draw.DrawText( hp, "Trebuchet22", pos.x, pos.y - 15, Color(255, 0, 0, 255), 1 ) end end end end hook.Add( "HUDPaint", "wall", wall ) concommand.Add( "wall", wall ) else return end[/CODE][/QUOTE] Okay i'll try it :D
doesnt work :( [editline]27th October 2013[/editline] [QUOTE=KingCentKing;42663390]doesnt work :([/QUOTE] ] wall Unknown command: wall
It's a convar, type wall 1 in console
Okay i'll try it! [editline]27th October 2013[/editline] Doesnt work! ] wall Unknown command: wall
[QUOTE=KingCentKing;42663758]Okay i'll try it! [editline]27th October 2013[/editline] Doesnt work! ] wall Unknown command: wall[/QUOTE] pls help
What folder did you put the script in?
lua/autorun
What now? :D
[QUOTE=KingCentKing;42672762]What now? :D[/QUOTE] nobody?
no one is going to help you if you're going to be the biggest leech ever.
The reason it isn't "working" is because [B]the script is in autorun[/B] and it's doing a check for IsValid(LocalPlayer()). [B]The local player won't be valid while autorun scripts are loading[/B], [U]the player hasn't spawned yet.[/U] A simple solution would be to move your check for the steamid to inside your HUDPaint hook. An better solution would be to move both the steamid check and the HUDPaint hook.Add to inside another hook that runs once the player loads. It would flow like this Autorun scripts loads It adds a hook for when the player spawns, eg PlayerSpawn or PlayerInitialSpawn or whatever you want to use. The PlayerSpawn hook then checks the the players steamid, and if it matches, it adds the hook for the HUDPaint.
[lua]if SERVER then AddCSLuaFile("espscript.lua") function check( ply ) if ply:SteamID() == "STEAM_0:" then CreateClientConVar( "esp", 0, true, false ) function esp() if tobool( GetConVarNumber( "esp" ) ) then for k, v in pairs( player.GetAll() ) do if v != LocalPlayer() then local pos =( v:GetShootPos() + Vector( 0, 0, 30) ):ToScreen() draw.DrawText( v:Nick(), "Trebuchet24", pos.x, pos.y - 45 , Color(255, 255, 255, 255), 1 ) local hp = v:Health() draw.DrawText( hp, "Trebuchet22", pos.x, pos.y - 15, Color(255, 0, 0, 255), 1 ) end end end end hook.Add( "HUDPaint", "esp", esp ) concommand.Add( "esp", esp ) else return end end hook.Add( "PlayerSpawn", "check", check ) end [/lua] I tried this but it's not working. Am I missing something really obvious?
That's pretty messy, it looks like the esp() function is inside the check() function, I can't work it out. Something along these lines is what I would do [lua]if SERVER then AddCSLuaFile() --no argument required, it will send this file end if CLIENT then local function ToggleESP() local ply = LocalPlayer() if not IsValid(ply) then ErrorNoHalt("WTF, LocalPlayer isn't valid!") end if ply:SteamID() ~= "YOUR_ID" then print("You don't have access to this command") return --stop here end --If we reach here, their steamid is ok, now toggle esp ply.HasESP = not ply.HasESP --This will turn it on and off end concommand.Add("esp", ToggleESP); local function HUDPaint() local ply = LocalPlayer() if not IsValid(ply) then return end --this should never happen, LocalPlayer should be valid if we are running HUDPaint if ply.HasESP then --Check if they have it enabled --DO THE ESP MAGIC HERE end end hook.Add("HUDPaint", "ESP_Paint", HUDPaint) end [/lua]
[QUOTE=wh1t3rabbit;42683109]That's pretty messy, it looks like the esp() function is inside the check() function, I can't work it out. Something along these lines is what I would do [lua]if SERVER then AddCSLuaFile() --no argument required, it will send this file end if CLIENT then local function ToggleESP() local ply = LocalPlayer() if not IsValid(ply) then ErrorNoHalt("WTF, LocalPlayer isn't valid!") end if ply:SteamID() ~= "YOUR_ID" then print("You don't have access to this command") return --stop here end --If we reach here, their steamid is ok, now toggle esp ply.HasESP = not ply.HasESP --This will turn it on and off end concommand.Add("esp", ToggleESP); local function HUDPaint() local ply = LocalPlayer() if not IsValid(ply) then return end --this should never happen, LocalPlayer should be valid if we are running HUDPaint if ply.HasESP then --Check if they have it enabled --DO THE ESP MAGIC HERE end end hook.Add("HUDPaint", "ESP_Paint", HUDPaint) end [/lua][/QUOTE] Is this code now working?
[QUOTE=KingCentKing;42687371]Is this code now working?[/QUOTE] That code wont do anything, read the commented out bits in the code.
[QUOTE=smithy285;42688291]That code wont do anything, read the commented out bits in the code.[/QUOTE] Oh, thank you :D I'm an idiot XDD [editline]29th October 2013[/editline] Remember I'm a newbie! Is this code right? [CODE]if SERVER then AddCSLuaFile() --no argument required, it will send this file end if CLIENT then local function ToggleESP() local ply = LocalPlayer() if not IsValid(ply) then ErrorNoHalt("WTF, LocalPlayer isn't valid!") end if ply:SteamID() ~= "STEAM_0:0:72931887" then print("You don't have access to this command") return --stop here end --If we reach here, their steamid is ok, now toggle esp ply.HasESP = not ply.HasESP --This will turn it on and off end concommand.Add("esp", ToggleESP); local function HUDPaint()Denk daran das ich ein neuling bin local ply = LocalPlayer() if not IsValid(ply) then return end --this should never happen, LocalPlayer should be valid if we are running HUDPaint if ply.HasESP then --Check if they have it enabled if tobool( GetConVarNumber( "esp" ) ) then for k, v in pairs( player.GetAll() ) do if v != LocalPlayer() then local pos =( v:GetShootPos() + Vector( 0, 0, 30) ):ToScreen() draw.DrawText( v:Nick(), "Trebuchet24", pos.x, pos.y - 45 , Color(255, 255, 255, 255), 1 ) local hp = v:Health() draw.DrawText( hp, "Trebuchet22", pos.x, pos.y - 15, Color(255, 0, 0, 255), 1 ) end end end end end hook.Add("HUDPaint", "ESP_Paint", HUDPaint) end[/CODE] [editline]29th October 2013[/editline] ??
[QUOTE=KingCentKing;42688353][CODE] local function HUDPaint()Denk daran das ich ein neuling bin[/CODE][/QUOTE] Well clearly the mistake is over here. Correct German grammar would be "dass" and not "das".
[QUOTE=Maurice;42688672]Well clearly the mistake is over here. Correct German grammar would be "dass" and not "das".[/QUOTE] Ohhh, XDDDDDDDDD Sorry XDD [editline]29th October 2013[/editline] It is still not working! :( [editline]29th October 2013[/editline] ?? :D
Here you go, you annoying kid. [code]if SERVER then AddCSLuaFile() --no argument required, it will send this file end if CLIENT then surface.CreateFont( "kingcentkingisanidiot", {font = "Arial", size=30, weight=700}) local function ToggleESP() local ply = LocalPlayer() if not IsValid(ply) then ErrorNoHalt("WTF, LocalPlayer isn't valid!") end if ply:SteamID() ~= "STEAM_0:0:72931887" then print("You don't have access to this command") return --stop here end --If we reach here, their steamid is ok, now toggle esp ply.HasESP = not ply.HasESP --This will turn it on and off end concommand.Add("esp", ToggleESP); local function HUDPaint() local ply = LocalPlayer() if not IsValid(ply) then return end --this should never happen, LocalPlayer should be valid if we are running HUDPaint if ply.HasESP then --Check if they have it enabled for k, v in pairs( player.GetAll() ) do if v != LocalPlayer() then local pos =( v:GetShootPos() + Vector( 0, 0, 30) ):ToScreen() for x = -1, 1, 2 do for y = -1, 1, 2 do draw.DrawText( v:Nick(), "kingcentkingisanidiot", pos.x+x, pos.y - 45+y , Color(0, 0, 0), 1 ) draw.DrawText( v:Health() .. " hp", "kingcentkingisanidiot", pos.x+x, pos.y - 15+y, Color(0, 0, 0), 1 ) end end draw.DrawText( v:Nick(), "kingcentkingisanidiot", pos.x, pos.y - 45, Color(math.Clamp(255-v:Health()*2.55, 0, 255), math.Clamp(v:Health()*2.55, 0, 255), 0), 1 ) draw.DrawText( v:Health() .. " hp", "kingcentkingisanidiot", pos.x, pos.y - 15, Color(math.Clamp(255-v:Health()*2.55, 0, 255), math.Clamp(v:Health()*2.55, 0, 255), 0), 1 ) local min, max = v:OBBMins(), v:OBBMaxs() local corners = { Vector( min.x, min.y, min.z ), Vector( min.x, min.y, max.z ), Vector( min.x, max.y, min.z ), Vector( min.x, max.y, max.z ), Vector( max.x, min.y, min.z ), Vector( max.x, min.y, max.z ), Vector( max.x, max.y, min.z ), Vector( max.x, max.y, max.z ) } local minX, minY, maxX, maxY = ScrW() * 2, ScrH() * 2, 0, 0 --stolen from http://www.rabidtoaster.com/scripts/Client%20Side/onScreenBB.lua (Google Cache) for _, corner in pairs( corners ) do local onScreen = v:LocalToWorld( corner ):ToScreen() minX, minY = math.min( minX, onScreen.x ), math.min( minY, onScreen.y ) maxX, maxY = math.max( maxX, onScreen.x ), math.max( maxY, onScreen.y ) end local width, height = maxX-minX, maxY-minY surface.SetDrawColor( 255, 0, 0 ) surface.DrawOutlinedRect( minX, minY, width, height ) end end end end hook.Add("HUDPaint", "ESP_Paint", HUDPaint) end[/code] Tested and works. I am expecting 50 bitcoins in my wallet within the next 3 days or I will h4ck your computer.
[QUOTE=Maurice;42689403]Here you go, you annoying kid. [code]if SERVER then AddCSLuaFile() --no argument required, it will send this file end if CLIENT then surface.CreateFont( "kingcentkingisanidiot", {font = "Arial", size=30, weight=700}) local function ToggleESP() local ply = LocalPlayer() if not IsValid(ply) then ErrorNoHalt("WTF, LocalPlayer isn't valid!") end if ply:SteamID() ~= "STEAM_0:0:72931887" then print("You don't have access to this command") return --stop here end --If we reach here, their steamid is ok, now toggle esp ply.HasESP = not ply.HasESP --This will turn it on and off end concommand.Add("esp", ToggleESP); local function HUDPaint() local ply = LocalPlayer() if not IsValid(ply) then return end --this should never happen, LocalPlayer should be valid if we are running HUDPaint if ply.HasESP then --Check if they have it enabled for k, v in pairs( player.GetAll() ) do if v != LocalPlayer() then local pos =( v:GetShootPos() + Vector( 0, 0, 30) ):ToScreen() for x = -1, 1, 2 do for y = -1, 1, 2 do draw.DrawText( v:Nick(), "kingcentkingisanidiot", pos.x+x, pos.y - 45+y , Color(0, 0, 0), 1 ) draw.DrawText( v:Health() .. " hp", "kingcentkingisanidiot", pos.x+x, pos.y - 15+y, Color(0, 0, 0), 1 ) end end draw.DrawText( v:Nick(), "kingcentkingisanidiot", pos.x, pos.y - 45, Color(math.Clamp(255-v:Health()*2.55, 0, 255), math.Clamp(v:Health()*2.55, 0, 255), 0), 1 ) draw.DrawText( v:Health() .. " hp", "kingcentkingisanidiot", pos.x, pos.y - 15, Color(math.Clamp(255-v:Health()*2.55, 0, 255), math.Clamp(v:Health()*2.55, 0, 255), 0), 1 ) local min, max = v:OBBMins(), v:OBBMaxs() local corners = { Vector( min.x, min.y, min.z ), Vector( min.x, min.y, max.z ), Vector( min.x, max.y, min.z ), Vector( min.x, max.y, max.z ), Vector( max.x, min.y, min.z ), Vector( max.x, min.y, max.z ), Vector( max.x, max.y, min.z ), Vector( max.x, max.y, max.z ) } local minX, minY, maxX, maxY = ScrW() * 2, ScrH() * 2, 0, 0 --stolen from http://www.rabidtoaster.com/scripts/Client%20Side/onScreenBB.lua (Google Cache) for _, corner in pairs( corners ) do local onScreen = v:LocalToWorld( corner ):ToScreen() minX, minY = math.min( minX, onScreen.x ), math.min( minY, onScreen.y ) maxX, maxY = math.max( maxX, onScreen.x ), math.max( maxY, onScreen.y ) end local width, height = maxX-minX, maxY-minY surface.SetDrawColor( 255, 0, 0 ) surface.DrawOutlinedRect( minX, minY, width, height ) end end end end hook.Add("HUDPaint", "ESP_Paint", HUDPaint) end[/code] Tested and works. I am expecting 50 bitcoins in my wallet within the next 3 days or I will h4ck your computer.[/QUOTE] :D Love you #No_Gayy! Thank you!
Sorry, you need to Log In to post a reply to this thread.