How do we load custom .pcf files into garrysmod (pre-beta)? Is a particle manifest file needed? If so, how does ParseParticleManifest work?
-snip- sorry
How can I retrieve a value from a DMultiChoice?
[QUOTE=Persious;35071044]How can I retrieve a value from a DMultiChoice?[/QUOTE]
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index755b.html?title=DMultiChoice[/url]
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexd054.html?title=DMultiChoice.GetOptionText[/url]
Oh and - can I use a TOOL:Draw() hook or something similar?
I know about the GetOptionText, but using it as GetOptionText() won't return anything.
How the heck close Derma frame, after function is completed?
[QUOTE=Krizzu;35083412]How the heck close Derma frame, after function is completed?[/QUOTE]
frame:Remove()
Finally! Thanks (:
Got it working, if someone else ends up with the same problem, the solution is [lua]DMultiChoice.TextEntry:GetValue()[/lua]
I'm changing heads through lua with ClientsideModel for the new head, and the problem is if the players not in your pvs when creating the new model and parenting it to the player's model, it glitches out. Can anyone help?
How would I go about updating using MySQLite?
My current part
[lua]sql.Query("UPDATE Wanted SET Crime = " .. Crime .. " WHERE SuspectID = '" .. tonumber(ID) .. "'")
[/lua]
Isn't updating. I have no clue why, and I even checked if Crime and ID was sent from the client, which it did.
Ok, so it took me a while to figure out how to use the shared.lua file for my addon, but I think I am using it correctly, in this case to create a single table that can be accessed by both the client (to view data) and the server (to actually mess with said data). My issue is that I've discovered how to bind multiple keyboard keys to create derma menus (currently just a box with some text in it). However, my issue is that if I hit the button multiple times, multiple versions of the same menu popup.
Can anyone show me how to create a menu that toggles on and off, without spawning multiple menus?
I already posted this in Questions, but haven't got solution.
My problem is that when I draw a large array of pixels to the surface using DrawRect, my FPS count falls to 2-3. Garry said that surface.DrawRect creates 2 triangles for each rectangle, making my graphics card have to draw 128000 triangles for a small 320x200 screen.
Is there some way to really draw pixels with only 2 triangles for entire array? Maybe there's a way to set color of render target pixels? 2 people told me about render targets, but I can't find appropriate function on GM Wiki.
[QUOTE=Persious;35087924]How would I go about updating using MySQLite?
My current part
[lua]sql.Query("UPDATE Wanted SET Crime = " .. Crime .. " WHERE SuspectID = '" .. tonumber(ID) .. "'")
[/lua]
Isn't updating. I have no clue why, and I even checked if Crime and ID was sent from the client, which it did.[/QUOTE]
Is SuspectID an INT or a VARCHAR? If you're converting ID to a number I don't see why SuspectID would be a TEXT or VARCHAR. Remove the ' '.
[CODE]self.sh1 = ents.Create("prop_physics")
self.sh1:SetModel("models/props_c17/door01_left.mdll")
self.sh1:SetPos(self:GetPos()+Vector(-55, -55, 0))
self.sh1:SetAngles(self:GetAngles()+Angle(90,90,0))
self.sh1:SetParent(self)
function self.sh1:Use(ent) -- something wrong here
print("yay")
end
self.sh1:Spawn()[/CODE]
When I use it I never get a "yay" in console. What's wrong?
I think that function only works with SEnts
How add Message at the middle of the screen?
objPl:PrintMessage( HUD_PRINTCENTER, "message here" );
that only works server-side
self.lblTeam:SetText( ****** )
I need to get player rank in scorboard, so what to use?
Tested:
self.lblTeam:SetText( self:EV_GetRank() )
self.lblTeam:SetText( pl:EV_GetRank() )
that's how you do it afaik, is there an error or something
[sui_scoreboard\player_row.lua:129] attempt to index global 'pl' (a nil value)
[CODE]self.lblTeam:SetText( pl:EV_GetRank() )[/CODE]
It just can't get the rank, and i dont know whay.
sui_scoreboard\player_row.lua:129] attempt to call method 'EV_GetRank' (a nil value)
[CODE]self.lblTeam:SetText( self:EV_GetRank() )[/CODE]
isn't it self.Player instead of pl?
self.Player:EV_GetRank()
Worked with no errors, testing now. Thanks.
---------------------------------------------
[b]Updated:[/b]
Working
---------------------------------------------
[b]Updated:[/b]
Now i need code to get rank color.
[QUOTE=_nonSENSE;35090131]Is SuspectID an INT or a VARCHAR? If you're converting ID to a number I don't see why SuspectID would be a TEXT or VARCHAR. Remove the ' '.[/QUOTE]
Oh, I see. ID is a int.
[QUOTE=airidas338;35092162]self.Player:EV_GetRank()
Worked with no errors, testing now. Thanks.
---------------------------------------------
[b]Updated:[/b]
Working
---------------------------------------------
[b]Updated:[/b]
Now i need code to get rank color.[/QUOTE]
does Evolve have that feature?
[url=http://bananatree.im/wiki/wiki.garrysmod.com/index124d.html?title=G.PrintMessage]G.PrintMessage[/url] with HUD_PRINTCENTER on server to broadcast, [url=http://bananatree.im/wiki/wiki.garrysmod.com/indexebff.html?title=Player.PrintMessage]Player.PrintMessage[/url] on both client and server to print only to single user.
Still doesn't work
[lua]
local Crime = args[1]
local Stage = args[2]
local ID = args[3]
print("Crime: " .. Crime .. "\nStage: " .. Stage .. "\nID: " .. ID)
sql.Query("UPDATE Wanted SET Crime = '" .. Crime .. "', '" .. Stage .. "' WHERE SuspectID = " .. tonumber(ID) .. "")
[/lua]
"UPDATE Wanted SET Crime = 'CrimeVal', 'StageVal' WHERE SuspectID = id"
That's the query you're sending
Sorry, you need to Log In to post a reply to this thread.