• hud hide code?
    4 replies, posted
hello, so i have a custom hud and i dont want popple stealing it is they anywhere i can hide some bits of key code that make the hud run.? i know that a hud is client side but can i hide some code for example local function GetGroupColor( ply ) if not IsValid(ply) then return "Console" end if ply.getDarkRPVar and ply:getDarkRPVar("steamid") then return Color( 192,192,192, 255) elseif ply:IsUserGroup("headadmin") then return Color( 128, 0, 0, 255 ) elseif ply:IsUserGroup("superadmin") then return Color( 4, 6, 167, 255 ) elseif ply:IsUserGroup("developer") then return Color( 4, 6, 167, 255 ) elseif ply:IsUserGroup("admin") then return Color( 200, 0, 0, 255 ) elseif ply:IsUserGroup( "moderator" ) then return Color( 200, 100, 0, 255 ) elseif ply:IsUserGroup("vip") then return Color(50,205,50, 255 ) else return Color( 192,192,192, 255) end end local staffrankshud = { "owner", "superadmin", "admin", "headadmin", "moderator", "developer", "coowner" } local RankData = { ["VIP"] = { Material( "vip-iconzarp.png" ), Color( 150, 150, 170, 255 ) }, ["Moderator"] = { Material( "icon16/award_star_gold_3.png" ), Color( 200, 100, 0, 255 ) }, ["Admin"] = { Material( "icon16/shield.png" ), Color( 200, 0, 0, 255 ) }, ["Super Admin"] = { Material( "icon16/shield_add.png" ), Color( 200, 0, 0, 255 ) }, ["Head Admin"] = { Material( "icon16/star.png" ), Color( 4, 6, 167, 255 ) }, ["Developer"] = { Material("icon16/asterisk_yellow.png" ), Color( 127, 0, 255 , 200) }, ["Co-Owner"] = { Material( "icon16/asterisk_orange.png" ), Color( 0, 175, 175, 200 ) }, ["Owner"] = { Material( "icon16/award_star_bronze_1.png" ), Color( 127, 0, 255 , 200) } } could i make another hud and put SV_ onto it?
Hiding your code is really a useless venture, but the best you can do is store the code server-side, then send it to the client to run directly. There is no way to completely hide code from the client.
Send the code to the client from the server and use CompileString to run it from a fake Lua source eg 'hud/../nul/hud.lua'. Only way people can get past this is if they detour CompileString before they can receive/send net messages. I believe !CAC uses this method for its payload system.
@txike how would i do this?
[QUOTE=moderatorondu;51622708]@txike how would i do this?[/QUOTE] Net messages, CompileString, and an understanding of Lua.
Sorry, you need to Log In to post a reply to this thread.