[QUOTE=BoowmanTech;48686686]Tried it and it return an errors?
Do you know how I can run lua_run via RunConsoleCommand?
Whenever I run RunConsoleCommand using lua_run I get this: RunConsoleCommand: Command is blocked! (lua_run)[/QUOTE]
You can't run this command via RunConsoleCommand nor ConCommand.
[URL="https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexcfcc.html"]Here's full list of blocked concommands (probably outdated and not full now)[/URL]
[QUOTE=Becomeimp;48683363]bumping this from a few days ago, still no luck on even figuring out the problem[/QUOTE]
If those two snippets were your only code, then getting 100 would be extremely strange and doesn't make any sense. However, I assume you have other code that is somehow changing the value. If you could post your entire code that would be helpful.
welp just ignore me now, im an idiot who copy-pasted the tables to make a new table faster, and forgot to change the variable name :hammered: so i had a bunch of stuff like this
[code]
Heir = {}
Lord["health"] = classpect_base["health"]
[/code]
Any particular reason why every single prop_vehicle_prisoner_pod plays the ACT_GMOD_ROLLER_COASTER driving animation ?
HandleAnimation callback on pod / seat doesn't seem to get run at all same goes for this hook: [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/HandlePlayerDriving]GM/HandlePlayerDriving[/url]
I'm feeling a bit dumbfounded here..
Hey i got 2 small questions,
1. how do i put like 5 diffrent textures on one model.
2. Is it possible to put like text on an SWEP if yes, how?
Is there a way to check if the context menu buttons is being pressed?
[QUOTE=BoowmanTech;48686686]Tried it and it return an errors?
Do you know how I can run lua_run via RunConsoleCommand?
Whenever I run RunConsoleCommand using lua_run I get this: RunConsoleCommand: Command is blocked! (lua_run)[/QUOTE]
what the fuck? if you're in Lua already why do you need to ccmd into lua?
Not very good when it comes to understanding 3d space, or planes.
Currently working on a 3D2D multiple buttons which uses util.IntersectRayWithPlane to highlight and get currently selected button.
The problem is is that insect point angles are going horiz instead of vertical.
Sorry for the shitty 30 second mock up. [U]The black[/U] boxes are the boxes boxes. [U]The Red[/U] is where the rays are actually intersecting. Can anybody explain why?
[IMG]http://imgur.com/1I5tFc3[/IMG] [URL="http://imgur.com/1I5tFc3"]http://imgur.com/1I5tFc3[/URL]
[CODE] local lpos = Vector( -4.5,- 25, 37)
local pos = self:LocalToWorld( lpos )
local ang = self:GetAngles()
local balpha = 240 * alpha
local scale = 0.131
ang:RotateAroundAxis( ang:Up(), 0 )
--ang:RotateAroundAxis(ang:Forward(), 90)
local localpos = util.IntersectRayWithPlane(
LocalPlayer():GetShootPos(), LocalPlayer():GetAimVector(),
pos, ang:Up())
local xint, yint = 0, 0
local cactive = false
if localpos then
local hitpos = self:WorldToLocal( localpos ) - lpos
xint = hitpos.y * (1 / scale)
yint = hitpos.x * (1 / scale)
cactive = true
end
[/CODE]
[QUOTE=zerf;48689718]what the fuck? if you're in Lua already why do you need to ccmd into lua?[/QUOTE]
Cause why not, I wanted to make a DTextEntry and allow the player to run lua through there rather than using the console.
[QUOTE=BoowmanTech;48689871]Cause why not, I wanted to make a DTextEntry and allow the player to run lua through there rather than using the console.[/QUOTE]
Why not use this?
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Global/RunString]Global.RunString[/url]
[QUOTE=Jeezy;48689902]Why not use this?
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Global/RunString]Global.RunString[/url][/QUOTE]
Well I tried to run it like this: [code] RunString("lua_run Entity(1):SetHealth(300)") [/code] and I get the following error
[code]
[ERROR] RunString:1: '=' expected near 'Entity'
1. unknown - RunString:0
[/code]
[QUOTE=BoowmanTech;48689979]Well I tried to run it like this: [code] RunString("lua_run Entity(1):SetHealth(300)") [/code] and I get the following error
[code]
[ERROR] RunString:1: '=' expected near 'Entity'
1. unknown - RunString:0
[/code][/QUOTE]
You are doing something inherently wrong.
Please look up what a function does on the wiki before complaining that it doesn't work.
lua_run console command is strictly for debugging purposes.
It is extremely bad idea to give clients ability to run SERVERSIDE Lua ON THE SERVER.
What you should be using are netmessages or custom console commands that do required actions on servers after a player sends the net message to server/executes a serverside console command from their console. But you [b]must[/b] be careful to not allow people to do what they are not supposed to do with those commands ( including net messages ) for the sake of the server's security.
In the example of executing lua on the server from client, anyone can just set themselves to admin, create any entities, crash the server, kick or ban anyone as an example and cause mayhem .
Is it possible to check what workshop addons a client has loaded while they're connected to a server with Lua or even a concommand perhaps?
[QUOTE=JRODISME;48692455]Is it possible to check what workshop addons a client has loaded while they're connected to a server with Lua or even a concommand perhaps?[/QUOTE]
engine.GetAddons()
Any way to make the text cursor in a DTextEntry to be at the end after using RequestFocuson it?
[QUOTE=LegoGuy;48692722]Any way to make the text cursor in a DTextEntry to be at the end after using RequestFocuson it?[/QUOTE]
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Panel/SetCaretPos]Panel:SetCaretPos[/url] ?
[QUOTE=man with hat;48692761][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Panel/SetCaretPos]Panel:SetCaretPos[/url] ?[/QUOTE]
The naming of these functions are almost as bad as PHP :why:
(Thank you so much)
If you have a table saved in a .txt file in the client how would you send that table data to the clients
[QUOTE=SuperiorGamer;48694290]If you have a table saved in a .txt file in the client how would you send that table data to the clients[/QUOTE]
Reading the file, compressing it and then sending it by net
Why does richtext:GetText() or richtext:GetValue() not work
Before update I can use this code:
[code]
local mat = Material("orange") -- for example
mat:SetVector("$color2", Vector(0.5,0.5,0.5))
ent:SetSubMaterial(0, mat)
[/code]
And this work. But after update I get error, about I use userdata, not string. But, if I try use mat:GetName(), then material don't render normally(like eye material($iris parameter)). Before all works right.
What KEY_ enum represents the "command" key on mac?
[QUOTE=LegoGuy;48697236]What KEY_ enum represents the "command" key on mac?[/QUOTE]
KEY_LWIN and KEY_RWIN
Three questions:
1) Let's say I create a shared table called TABLE, and then I go to a server file and do TABLE.Server = {}. Since the original table was shared, will they be able to see the table that was created serverside?
2) If I get a Player and set them a variable, will they be able to change it? For example, if I did Player.TimeOnServer or self.TimeOnServer
3) If I set a variable to a Player (like the one above), where is it saved to?
[QUOTE=PigeonTroll;48697332]Three questions:
1) Let's say I create a shared table called TABLE, and then I go to a server file and do TABLE.Server = {}. Since the original table was shared, will they be able to see the table that was created serverside?
2) If I get a Player and set them a variable, will they be able to change it? For example, if I did Player.TimeOnServer or self.TimeOnServer
3) If I set a variable to a Player (like the one above), where is it saved to?[/QUOTE]
1) If TABLE.Server is defined in a file only loaded server-side then no.
2) No, if a variable on a player object is set server-side it'll only be usable server-side.
3) The player object.
Is it possible to make a material have rounded corners?
Basically I am blurring a panel and I want it to have the corners rounded.
[QUOTE=BoowmanTech;48698615]Is it possible to make a material have rounded corners?
Basically I am blurring a panel and I want it to have the corners rounded.[/QUOTE]
Stencils would be my guess.
How would I go about drawing 3d2d ontop of a SWEP viewmodel? An example would be great.
[QUOTE=Pigsy;48704077]How would I go about drawing 3d2d ontop of a SWEP viewmodel? An example would be great.[/QUOTE]
Use the HUDPaint hook.
Sorry, you need to Log In to post a reply to this thread.