• What do you need help with? V3
    6,419 replies, posted
Hello again! :) Guys i have a question: The server (srcds) is giving errors: [IMG]http://s13.postimage.org/3t5h4vl87/error.jpg[/IMG] I have already run the hldsupdatetool with the command for counterstrike -source and still i get this error message i already tried to copy it to the orangebox folder same result
[QUOTE=SuperLDO;38990744]Hello again! :) Guys i have a question: The server (srcds) is giving errors: [IMG]http://s13.postimage.org/3t5h4vl87/error.jpg[/IMG] I have already run the hldsupdatetool with the command for counterstrike -source and still i get this error message i already tried to copy it to the orangebox folder same result[/QUOTE] Copy the "cstrike" folder inside counter strike folder to the "orangebox" directory, so you have: srcds/orangebox/cstrike srcds/orangebox/garrysmod and NOT srcds/counter-strike (or however hlds does it, I have since forgotten)
hldsupdatetool does css/cstrike, but it just looks like those models don't have vphysics [editline]27th December 2012[/editline] and they're skybox models, so who cares
[QUOTE=Banana Lord.;38990841]hldsupdatetool does css/cstrike, but it just looks like those models don't have vphysics [editline]27th December 2012[/editline] and they're skybox models, so who cares[/QUOTE] Well the problem is i have some crates but instead of jumping on it i walk through it and when i shoot i see the bullets but the smoke is purple with black squar like the gun smoke cant be loaded!
[QUOTE=SuperLDO;38990858]the smoke is purple with black squar like the gun smoke cant be loaded![/QUOTE] Are you sure you have CSS installed clientside?
[QUOTE=Trumple;38990980]Are you sure you have CSS installed clientside?[/QUOTE] CSS is installed on clientside! Because everyone who joined my server has the same problem. Everyone can walk through crates and walk through the jail without any problems. So it must be serverside what did not mount [editline]27th December 2012[/editline] Do you guys have other suggestions :)
Anybody care to enlighten me on how I can add Icons to this dermamenu? [t]http://i.imgur.com/tGuiu.jpg[/t] [lua] self.AvatarButton.DoClick = function(btn) local MenuButtonOptions = DermaMenu(AvatarButton) -- Creates the menu MenuButtonOptions:AddOption("Show Profile", function() self.Player:ShowProfile() end) -- Add options to the menu MenuButtonOptions:AddOption("Get Info", function() RP:Notify( RP.colors.blue, "Player ", RP.colors.white, self.Player:Nick().. " [" .. self.Player:SteamID() .. "] " ) end ) if not LocalPlayer():IsAdmin() then return end MenuButtonOptions:AddSpacer() MenuButtonOptions:AddOption("Will", function() Msg("You") end ) MenuButtonOptions:AddOption("Finish Later", function() Msg("?") end ) MenuButtonOptions:Open() -- Open the menu AFTER adding your options end [/lua]
take a look at how ASSMod does it
[QUOTE=Banana Lord.;38991435]take a look at how ASSMod does it[/QUOTE] Is there a non-convoluted way?
it doesnt work i tried anything right now but do you guys can give me any suggestions with the css issue see message above.
[QUOTE=Netheous;38989771]Maybe you are sending the scene to only one person ? Would be easier to tell if you show us the code [editline]27th December 2012[/editline] Okay, so back to the problem. In the past, I was doing this in my gamemode: shared.lua [lua]CRP = {} function CRP.AddTeam( teamTbl ) team.SetUp(table.Count(CRP.Teams), teamTbl.Name, teamTbl.Color) CRP.Teams[teamTbl.Name] = teamTbl end CRP.Teams = {} local NewTeam = {} NewTeam["Name"] = "Citizen" NewTeam["Descr"] = [[You should look for a job, what quality of life will you have with such a low salary?]] NewTeam["Color"] = Color(185, 245, 0, 255) NewTeam["Salary"] = 35 NewTeam["Weapons"] = {} NewTeam["Mdls"] = {} NewTeam["Limit"] = false NewTeam["LvlReq"] = false NewTeam["VoteReq"] = false CRP.AddTeam(NewTeam) local NewTeam = {} NewTeam["Name"] = "Policeman" NewTeam["Descr"] = [[Don't drink on watch! Keep calm and patrol the streets, show them that you are worth your salary!]] NewTeam["Color"] = Color(255, 0, 255, 255) NewTeam["Salary"] = 70 NewTeam["Weapons"] = {} NewTeam["Mdls"] = {} NewTeam["Limit"] = 5 NewTeam["LvlReq"] = 2 NewTeam["VoteReq"] = false CRP.AddTeam(NewTeam) [REST OF THE CODE][/lua] And then, inside server/sv_database.lua I was doing: [lua]function CRP.DBLoadPlayer(ply) local DBresult = sql.Query("SELECT * FROM CRP_stats WHERE id = '"..ply:SteamID().."'") ply.CRPstats = {} ply.CRPstats["Name"] = DBresult.name or ply:Name() ply.CRPstats["Job"] = CRP.Teams[team.GetName(ply:Team())].Name or "Unemployed" ply.CRPstats["Money"] = DBresult.money or 0 ply.CRPstats["Salary"] = CRP.Teams[team.GetName(ply:Team())].Salary or 0 CRP.SendStats(ply, false, false, true) end function CRP.DBNewPlayer(ply) sql.Query("INSERT INTO CRP_stats ('id', 'name', 'money') VALUES ('"..ply:SteamID().."', 'Stranger', '0')") CRP.DBLoadPlayer(ply) end [REST OF THE CODE][/lua] And it worked just fine, but now when I do EV= {} in sh_events.lua And then in cl_events and sv_events try to put function into EV by doing "EV.FuncName()" I get [ERROR] gamemodes/darkrp/gamemode/client/cl_events.lua:1: attempt to index global 'EV' (a nil value) [ERROR] gamemodes/darkrp/gamemode/server/sv_events.lua:3: attempt to index global 'EV' (a nil value) Why is it happening ? I mean, I did everything as I did in my other code that worked in 100%[/QUOTE] How's the include order? sh_events.lua must be included before the client/server code so the table exists. Also, no. I'm trying to make only ONE player see the scene, when you call "PlayScene()" everybody see's the NPC play out that scene. I want only one player to see it.
[QUOTE=SuperLDO;38992195]it doesnt work i tried anything right now but do you guys can give me any suggestions with the css issue see message above.[/QUOTE] If it's original model from CS:S and it's a model meant to be used in skybox then there is nothing you can actually do, it was just meant not to have physics, it doesn't affect the gameplay other than that you won't collide with it @Edit: DAMN I am so silly, the reason why my stuff didn't work was because I attached it to hook named "OnPlayerChat" for testing purposes and I forgot to switch it... I shouldn't work at night, that's to be sure
[QUOTE=Netheous;38992423]If it's original model from CS:S and it's a model meant to be used in skybox then there is nothing you can actually do, it was just meant not to have physics, it doesn't affect the gameplay other than that you won't collide with it @Edit: DAMN I am so silly, the reason why my stuff didn't work was because I attached it to hook named "OnPlayerChat" for testing purposes and I forgot to switch it... I shouldn't work at night, that's to be sure[/QUOTE] Well it seems that other server whit this same map doesn't have the issue and its the same version map... And when i shoot i see purple and black squares instead of smoke..
[QUOTE=T3h raps13r;38985128][QUOTE=jrj996;38986053]Does anybody know of a way to fix the screenscale issue with fonts? The issue I'm talking about is that players on different resolutions have text being over-sized for them and it screws the positioning of things up.[/QUOTE] Oh yeah, and why is this tiny (tooltip) [img]http://puu.sh/1FLcR[/img] Also... [QUOTE=T3h raps13r;38985128]How can I get the current active page URL on a DHTML element? My FinishedURL and OpeningURL functions don't seem to be called.[/QUOTE] [/QUOTE] Still really need help with the URL thing. Can't seem to get those two functions working.
[QUOTE=ollie;38988622]Isn't it the same thing? 1 char = 1 byte right?[/QUOTE] You're right :p I thought it was different
-snip got it-
[QUOTE=Stiveno;38991339]Anybody care to enlighten me on how I can add Icons to this dermamenu? [t]http://i.imgur.com/tGuiu.jpg[/t] [lua] self.AvatarButton.DoClick = function(btn) local MenuButtonOptions = DermaMenu(AvatarButton) -- Creates the menu MenuButtonOptions:AddOption("Show Profile", function() self.Player:ShowProfile() end) -- Add options to the menu MenuButtonOptions:AddOption("Get Info", function() RP:Notify( RP.colors.blue, "Player ", RP.colors.white, self.Player:Nick().. " [" .. self.Player:SteamID() .. "] " ) end ) if not LocalPlayer():IsAdmin() then return end MenuButtonOptions:AddSpacer() MenuButtonOptions:AddOption("Will", function() Msg("You") end ) MenuButtonOptions:AddOption("Finish Later", function() Msg("?") end ) MenuButtonOptions:Open() -- Open the menu AFTER adding your options end [/lua][/QUOTE] I think you'd do it this way MenuButtonOptions:AddOption("Get Info", function() RP:Notify( RP.colors.blue, "Player ", RP.colors.white, self.Player:Nick().. " [" .. self.Player:SteamID() .. "] " ) end ):SetImage("image here") Update: This is how mine looks: [lua] SubMenu:AddOption("Copy Everything", function() SetClipboardText(line:GetColumnText(1).." - "..line:GetColumnText(2)) end):SetImage("png img here") [/lua]
Why is it that os.date("%s") closes out of my garry's mod?
I'm trying to have npcs spawn with random bone angles and positions, but math.random doesn't seem to be random? It chooses one variable, and sticks to it, even through server restarts.... So all npcs are in the same position. Heres what I have: [CODE] for i = 1,30 do self:ManipulateBoneAngles(i, Angle(math.random(-85,15),math.random(-85,15),math.random(-85,15))) self:ManipulateBonePosition( i, Vector(math.random(-85,15),math.random(-85,-15),math.random(-85,15))) end [/CODE] Any idea how to get this to work?
[QUOTE=Raught19;39003102]I'm trying to have npcs spawn with random bone angles and positions, but math.random doesn't seem to be random? It chooses one variable, and sticks to it, even through server restarts.... So all npcs are in the same position. Heres what I have: [CODE] for i = 1,30 do self:ManipulateBoneAngles(i, Angle(math.random(-85,15),math.random(-85,15),math.random(-85,15))) self:ManipulateBonePosition( i, Vector(math.random(-85,15),math.random(-85,-15),math.random(-85,15))) end [/CODE] Any idea how to get this to work?[/QUOTE] You could always create a variable that will represent the last random angle and then if new random angle == last random angle then re-do random. Thought, there was other, more efficient way
[QUOTE=Netheous;39003502]You could always create a variable that will represent the last random angle and then if new random angle == last random angle then re-do random. Thought, there was other, more efficient way[/QUOTE] thanks it seems to be working now for some reason... reverified gmod and now its working... Very strange...
Quicky one, anyone know of a way to remove or add checks/edits into util.ScreenShake ?
-snip-
I'm having trouble with mysqloo due to not being able to find the proper centos library files, so I have to result to glon. If there aren't any centos mysqloo library files, then is there at least a proper glon to php parser already made?
Could anyone tell me how Gmod 13 might have broken this?, or tell me what I've done wrong. [code] [ERROR] gamemodes/dm/gamemode/init.lua:245: attempt to call method 'GivePWeap' (a nil value) 1. Call - gamemodes/dm/gamemode/init.lua:245 2. unknown - gamemodes/dm/gamemode/init.lua:136 3. Spawn - [C]:-1 4. unknown - gamemodes/dm/gamemode/sv_client.lua:51 [/code] [lua] function GM:PlayerLoadout( pl ) pl:SetHealth(100) pl:SetWalkSpeed(250) pl.Regen = nil pl:SprintDisable() pl:GiveAmmo( 300, "XBowBolt", true ) pl:GiveAmmo( 1, "AR2", true ) pl:GiveAmmo( 50, "Pistol", true ) pl:GiveAmmo( 200, "SMG1", true ) pl:GiveAmmo( 200, "BUCKSHOT", true ) local team = pl:Team() if team == TEAM_PRISONER then pl:Give( "weapon_fist" ) pl:Give( "weapon_hands" ) self:GivePWeap(pl) pl:SelectWeapon( "weapon_hands" ) pl:SetArmor(0) pl:SetRunSpeed(290) pl:ChatPrint( "[Gjail] You are a Prisoner!" ) elseif team == TEAM_GUARD then pl:Give( "weapon_fist" ) pl:Give( "weapon_hands" ) pl:Give( "weapon_tranquilizer" ) pl:Give( "weapon_uspc" ) -- pl:Give( "scanner" ) pl:Give( "medkit" ) self:GiveGWeap(pl) pl:SelectWeapon( "weapon_uspc" ) pl:SetArmor(50) pl:SetRunSpeed(280) pl:ChatPrint( "[Gjail] You are a Guard!" ) end if ( pl:Superadmin( ) == 1 ) then pl:Give( "weapon_physgun" ) pl:Give( "gmod_tool" ) end end [/lua]
[QUOTE=Reload377;39005684]Could anyone tell me how Gmod 13 might have broken this?, or tell me what I've done wrong. [code] [ERROR] gamemodes/dm/gamemode/init.lua:245: attempt to call method 'GivePWeap' (a nil value) 1. Call - gamemodes/dm/gamemode/init.lua:245 2. unknown - gamemodes/dm/gamemode/init.lua:136 3. Spawn - [C]:-1 4. unknown - gamemodes/dm/gamemode/sv_client.lua:51 [/code] [lua] function GM:PlayerLoadout( pl ) pl:SetHealth(100) pl:SetWalkSpeed(250) pl.Regen = nil pl:SprintDisable() pl:GiveAmmo( 300, "XBowBolt", true ) pl:GiveAmmo( 1, "AR2", true ) pl:GiveAmmo( 50, "Pistol", true ) pl:GiveAmmo( 200, "SMG1", true ) pl:GiveAmmo( 200, "BUCKSHOT", true ) local team = pl:Team() if team == TEAM_PRISONER then pl:Give( "weapon_fist" ) pl:Give( "weapon_hands" ) self:GivePWeap(pl) pl:SelectWeapon( "weapon_hands" ) pl:SetArmor(0) pl:SetRunSpeed(290) pl:ChatPrint( "[Gjail] You are a Prisoner!" ) elseif team == TEAM_GUARD then pl:Give( "weapon_fist" ) pl:Give( "weapon_hands" ) pl:Give( "weapon_tranquilizer" ) pl:Give( "weapon_uspc" ) -- pl:Give( "scanner" ) pl:Give( "medkit" ) self:GiveGWeap(pl) pl:SelectWeapon( "weapon_uspc" ) pl:SetArmor(50) pl:SetRunSpeed(280) pl:ChatPrint( "[Gjail] You are a Guard!" ) end if ( pl:Superadmin( ) == 1 ) then pl:Give( "weapon_physgun" ) pl:Give( "gmod_tool" ) end end [/lua][/QUOTE] What's GivePWeap and GiveGWeap?
[QUOTE=Bandit Kitteh;39005427]I'm having trouble with mysqloo due to not being able to find the proper centos library files, so I have to result to glon. If there aren't any centos mysqloo library files, then is there at least a proper glon to php parser already made?[/QUOTE] i thought garry removed glon use json instead, the gmod built-in json functions are a bit buggy sometimes but for basic stuff it's ok and php has json_decode
Does anyone recall the hook to disable the prop context menu when holding C, for a stool?
[QUOTE=khuba;39006150]i thought garry removed glon use json instead, the gmod built-in json functions are a bit buggy sometimes but for basic stuff it's ok and php has json_decode[/QUOTE] I'm pretty sure Glon still exists. EDIT: I'm using it to keep track of player info and whatnot, though. It's a bit confusing. EDIT: Problem fixed, apologies. I had been using a very hashy makeup of it. I'm wondering how it even worked.
Where are some decent tutorials? The wiki seems painfully lacking.
Sorry, you need to Log In to post a reply to this thread.