Someone knows if HTML:GetHTMLMaterial is broken?
If i run the example on [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index3319.html[/url]
it gives me tons of errors
[QUOTE=NinjaS;38473511]That's only called once run it in a Tick hook... only
[lua] HtmlFrame.FinishedURL = function (url)
print("Loaded: "..url)
end
HtmlFrame.OpeningURL = function (url)
print("Opening: "..url)
end
[/lua]
With a pause script[/QUOTE]
I'm sorry, but i seriously have no idea what you just said.
Since player classes have SetupDataTables, ccan we set DTVars on players? Also are DTVars networked?
[QUOTE=KatNotDinner;38477895]Since player classes have SetupDataTables, ccan we set DTVars on players? Also are DTVars networked?[/QUOTE]
I'd use NetworkVar, but yes.
What's the difference, and are you saying yes to both questions? Also is it true that here's Set|GetDTString()?
[QUOTE=KatNotDinner;38478662]Also is it true that here's Set|GetDTString()?[/QUOTE]
Yeah, we've got 4 dt strings, each with 1024 chars limit.
[QUOTE=101kl;38475859]I'm sorry, but i seriously have no idea what you just said.[/QUOTE]
I'm sorry, but i seriously have no idea what you just said.
What's the best way to make an HTTP POST request?
http.Post?
[editline]16th November 2012[/editline]
[url]http://wiki.garrysmod.com/page/Libraries/http/Post[/url]
Thanks!
[editline]16th November 2012[/editline]
For PlayerInitialSpawn, the wiki says this:
[quote=wiki]May return STEAM_ID_PENDING if the player is still joining[/quote]
Is there another hook that gets called if the player is done joining? In other words, when the player gets the SteamID? Or do I have to use timers?
[QUOTE=Jvs;38478677]Yeah, we've got 4 dt strings, each with 1024 chars limit.[/QUOTE]
Only 2 actually
[editline]16th November 2012[/editline]
[QUOTE=KatNotDinner;38478662]What's the difference, and are you saying yes to both questions? Also is it true that here's Set|GetDTString()?[/QUOTE]
NetworkVar makes use of the 3 floats used in Angles and Vectors, i.e. with NetworkVar you can have a lot more floats but no Angles/Vectors.
Hey, is it possible to change the texture of a prop_physics? I would like to know, so I don't have to deal with making a new model for my SWEP.
Is it just me, or does ShouldCollide not even work with ent:EnableCustomCollisions(true)? Whenever I go near that ent it just instantly shoves me out, or if I get far enough into the ent, it pushes the ent back.
So I used this tutorial to make a money saving and loading system, now, I want to do the same with a table, how would I do this?
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index94c7.html[/url]
This is the tutorial I was talking about.
[lua]local meta = FindMetaTable("Player")
function meta:AddMoney(amount)
local current_cash = self:GetMoney()
self:SetMoney( current_cash + amount )
end
function meta:SetMoney(amount)
self:SetNetworkedInt( "Money", amount )
self:SaveMoney()
end
function meta:SaveMoney()
local cash = self:GetMoney()
self:SetPData("money", cash)
end
function meta:SaveMoneyTXT()
file.Write(gmod.GetGamemode().Name .."/Money/".. string.gsub(self:SteamID(), ":", "_") ..".txt", self:GetMoneyString())
end
function meta:TakeMoney(amount)
--Add money function here
self:AddMoney(-amount)
end
function meta:GetMoney()
return self:GetNetworkedInt( "Money" )
end
[/lua]
This is the code for getting the money and all, I'm not sure how to do it because there is no "GetNetworkedTable" function.
[QUOTE=Darkwater124;38478882]Thanks!
[editline]16th November 2012[/editline]
For PlayerInitialSpawn, the wiki says this:
Is there another hook that gets called if the player is done joining? In other words, when the player gets the SteamID? Or do I have to use timers?[/QUOTE]
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexc4b1.html[/url]
I have decimals that I need to be sent through usermessages. But, they always are rounded down/up when received on clientside:
[QUOTE]SV: 14.44 0.07 1.6
CL: 14 0 1[/QUOTE]
I've used Shorts, Longs and tonumber(Strings) and it still rounds my numbers down/up. Any suggestions?
[QUOTE=brandonj4;38483170]I have decimals that I need to be sent through usermessages. But, they always are rounded down/up when received on clientside:
I've used Shorts, Longs and tonumber(Strings) and it still rounds my numbers down/up. Any suggestions?[/QUOTE]
Have you tried the new net library? It's on the official wiki.
[QUOTE=Crazy Quebec;38483180]Have you tried the new net library? It's on the official wiki.[/QUOTE]
Thanks, but I just found the [URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexb1f9.html"]function[/URL] I was looking for in usermessages. :tinfoil:
Thanks for your help anyway!
[QUOTE=NinjaS;38478780]I'm sorry, but i seriously have no idea what you just said.[/QUOTE]
You literally made no sense. Can someone answer it? I'm having trouble with it too.
[QUOTE=101kl;38471971]Does anyone know how to use the OpeningURL functions?
When i run this it renders the frame but i am getting nothing in the console.
[lua]
local HtmlFrame = vgui.Create("HTML")
HtmlFrame:SetSize(500,500)
HtmlFrame:SetPos( 10,10)
HtmlFrame:OpenURL("http://facepunch.com/")
HtmlFrame.FinishedURL = function (url)
print("Loaded: "..url)
end
HtmlFrame.OpeningURL = function (url)
print("Opening: "..url)
end
[/lua][/QUOTE]
[QUOTE=SammySung;38484911]You literally made no sense. Can someone answer it? I'm having trouble with it too.[/QUOTE]
Make that three. I actually have the exact same issue.
what is the best way to animate a surface so that it is the same speed whatever your fps is?
[QUOTE=Kwaq;38485802]what is the best way to animate a surface so that it is the same speed whatever your fps is?[/QUOTE]
Multiply any translations by either the change in curtime or by the frametime
[QUOTE=Staneh;38482836]So I used this tutorial to make a money saving and loading system, now, I want to do the same with a table, how would I do this?
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index94c7.html[/url]
This is the tutorial I was talking about.
[lua]*stuff*[/lua]
This is the code for getting the money and all, I'm not sure how to do it because there is no "GetNetworkedTable" function.[/QUOTE]
[lua]local meta = {}
meta.__index = meta
-- PLACE YOUR META FUNCTIONS HERE
function newMoneyObject() -- Use this function to create a new instance of the object
return setmetatable( {}, meta )
end[/lua]
I am trying to use gm_tmysql4_win32.dll on my server.
In the init.lua of my gamemode I have the following code:
[code]
require ("tmysql4")
[/code]
After starting the server and the gamemode, the console returns that it can't find "includes/modules/tmysql4.lua", pointing to line 3, which has the require function.
When trying to use "lua_run require ("tmysql4") it returns this:
[img]http://puu.sh/1r849[/img]
Any help would be appriciated.
EDIT:
I also tried to rename it to gmsv_tmysql4_win32.dll, but this didn't work either.
Maybe I have the wrong libmysql.dll? Where could I find the right one?
Got them from here.
[url]http://blackawps-glua-modules.googlecode.com/svn/trunk/gm_tmysql4_boost/Release/[/url]
Could someone tell me what Garry did with the old NPC code? Is it still the same or are there any major changes to it?
-snip-
[QUOTE=thejjokerr;38486770]It needs to be named "gmsv_tmysql4_win32.dll" in "lua/bin/"[/QUOTE]
Yes, I have that, that's why it's so weird that it refers to tmysql.lua
[QUOTE=Cyberuben;38487584]Yes, I have that, that's why it's so weird that it refers to tmysql.lua[/QUOTE]
It refers to tmysql.lua because it searches Lua modules after searching for binary modules, in short you've named it wrong/put it in the wrong place
I made a thread in help and support, but I'll post here to see if anyone knows how to do this:
How do I make a setplayermodel command? I need it to be compatible with Vein.
Not sure if I should post this here or not, sorry.
I'll explain it more carefully. I downloaded gm_tmysql4_win32.dll from BlackAwps' Google Code page. I put it into my lua/bin folder and tried to boot the server, saying that includes/modules/tmysql4.lua is missing. This "was called" by init.lua:3, saying:
[code]require ("tmysql4")[/code]
I changed the name to gmsv_tmysql4_win32.dll but no success so far. I have Libmysql.dll, however, I don't know of this is the right version. I downloaded it from a Google Code too, but I'm not sure if this is the right and most updated version.
If someone could give me assistance through Teamviewer, it would be appriciated.
Sorry, you need to Log In to post a reply to this thread.