Im trying to find a way to get the ip of the server im on (client side) and I have looked everywhere and I cant find it, anyone know how?
Hey guys, I don't think anyone ever answered here, so I'll post again.
Does anyone know of a way to draw a beam in an effect that can still be seen if neither the start- or end- points of the beam are visible?
Set the effect's render bounds to the start and end points.
Hola.
I'm trying to write out a Derma panel with a Lua Editor that I can easily use IG.
[Lua]local DermaPanel = vgui.Create ("DFrame")
DermaPanel:SetPos (50,50)
DermaPanel:SetSize (500,500)
DermaPanel:SetTitle ("Lua Editor")
DermaPanel:SetVisible (true)
DermaPanel:SetDraggable (true)
DermaPanel:ShowCloseButton (true)
DermaPanel:MakePopup()
local luaeditor = vgui.Create ("DLuaEditor", yourframe)
luaeditor:SetParent (DermaPanel)
luaeditor:SetPos(25,50)
luaeditor:SetSize(400,400)
luaeditor:SetCode([[
/*NOTHING*/
]])
print(luaeditor:GetCode())[/Lua]
( Yes, I'm aware the Derma panel is a bit offset, but no matter. )
My problem is that writing a code into the editor does nothing. How can I make the editor run Lua commands on my command?
RunString(luaeditor:GetCode())
Can you bzip2 the Lua cache?
Edit: I found some errors in my apache error log which suggest that it does look for a .bz2 cache file before the normal one, so I think you might be able to.
I've been working on a basic lua script that is a Left 4 Dead Voice Selection menu
everything is fine and dandy and works, only problem is that the lip syncing will not work.
I've tried the sound effects with a different addon, and the lipsyncing works fine with it.
[url=http://pastebin.com/HPL09SAb]Here's the coding for my script, I'd really like for the lipsyncing to work yaknow[/url]
[QUOTE=Death_God;35261945]I've been working on a [B]basic[/B] lua script that is a Left 4 Dead Voice Selection menu[/QUOTE]
Nearly 2000 lines of code and you call that "basic". You must be a pro coder.
(You should create a function that creates these buttons for you.)
[QUOTE=pennerlord;35262608]Nearly 2000 lines of code and you call that "basic". You must be a pro coder.
(You should create a function that creates these buttons for you.)[/QUOTE]
2000 lines of copypaste work don't make you a "pro coder".
[QUOTE=Gran PC;35262886]2000 lines of copypaste work don't make you a "pro coder".[/QUOTE]
I know. It was a bad joke.
The fact that the a voice selection menu is 2k lines shows that he isn't experienced. This can be done in less then 100 lines. Mine was like 58
ok i downloaded a dedicated server got it all setup, sandbox gamemode works decent, however some objects can be walked through, anyways when i run any gamemode besides sandbox (even the default ones) i get these errors
[lua]
---- Host_Changelevel ----
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_nuke/truck_nuke_glass.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_nuke/truck_nuke.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_nuke/car_nuke_glass.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_nuke/car_nuke_red.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_nuke/car_nuke_glass.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_nuke/car_nuke_black.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_train/utility_truck_windows.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_train/utility_truck.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_industrial/light.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_industrial/oil_storage.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_industrial/oil_storage.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_industrial/oil_storage.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_industrial/oil_storage.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_industrial/winch_deck.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_industrial/winch_deck.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_industrial/winch_stern.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_industrial/winch_stern.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_port/cargo_container01.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_port/cargo_container01.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_port/cargo_container01.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_train/de_train_horizontalcoolingtank.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_port/cargo_container01.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_prodigy/transformer.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_prodigy/desk_console1.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_prodigy/desk_console2.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_prodigy/desk_console3.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_industrial/light.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_dust/du_antenna_b.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_prodigy/transformer.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_port/cargo_container01.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_port/cargo_container01.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_port/cargo_container01.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_port/cargo_container01.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_train/acunit1.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/cs_assault/forklift.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_port/cargo_container01.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_port/cargo_container01.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_port/cargo_container01.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_nuke/electricalbox02.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props/de_nuke/lifepreserver.mdl)
Lua initialized (Lua 5.1)
=====================================================
Evolve 1.0 by Overv succesfully started serverside.
=====================================================
Included TTT language file: chef.lua
Included TTT language file: english.lua
Registering gamemode 'fretta' derived from 'base'
Registering gamemode 'terrortown' derived from 'fretta'
ScriptEnforce is disabled
Trouble In Terrorist Town gamemode initializing...
This is TTT version 27
WARNING: sv_scriptenforcer appears to be off. This will make cheating really easy!
WARNING: CS:S does not appear to be mounted by GMod. Things may break in strange ways. Server admin? Check the TTT readme for help.
Checking TTT file consistency.
Compressing lua files into data pack..
Skipped. Datapack exists.
Executing dedicated server config file
Attempted to create unknown entity type weapon_m3!
Can't init weapon_m3
Attempted to create unknown entity type weapon_sg552!
Can't init weapon_sg552
Attempted to create unknown entity type func_buyzone!
Can't init func_buyzone
Attempted to create unknown entity type func_buyzone!
Can't init func_buyzone
Couldn't find any entities named para_spawnen, which point_template spawne_para is specifying.
Couldn't find any entities named spawn_ak_template, which point_template template_fuer_ak is specifying.
ERROR!: Can't create physics object for models/weapons/w_shot_m3super90.mdl
ERROR!: Can't create physics object for models/weapons/w_rif_sg552.mdl
ERROR!: Can't create physics object for models/props/cs_office/vending_machine.mdl
ERROR!: Can't create physics object for models/props/cs_office/trash_can.mdl
ERROR!: Can't create physics object for models/props/cs_office/vending_machine.mdl
ERROR!: Can't create physics object for models/props/cs_office/sofa.mdl
ERROR!: Can't create physics object for models/props/de_inferno/bed.mdl
ERROR!: Can't create physics object for models/props/de_inferno/bed.mdl
ERROR!: Can't create physics object for models/props/cs_office/bookshelf1.mdl
ERROR!: Can't create physics object for models/props/cs_office/bookshelf3.mdl
ERROR!: Can't create physics object for models/props/cs_office/sofa_chair.mdl
ERROR!: Can't create physics object for models/props/cs_office/sofa.mdl
ERROR!: Can't create physics object for models/props/cs_militia/crate_extrasmallmill.mdl
ERROR!: Can't create physics object for models/props/de_prodigy/spoolwire.mdl
ERROR!: Can't create physics object for models/props/cs_office/sofa.mdl
ERROR!: Can't create physics object for models/props/cs_office/sofa.mdl
ERROR!: Can't create physics object for models/props/cs_office/vending_machine.mdl
ERROR!: Can't create physics object for models/props/cs_office/vending_machine.mdl
ERROR!: Can't create physics object for models/props/cs_office/sofa_chair.mdl
ERROR!: Can't create physics object for models/props/cs_office/sofa_chair.mdl
ERROR!: Can't create physics object for models/props/cs_militia/crate_extrasmallmill.mdl
ERROR!: Can't create physics object for models/props/cs_militia/crate_extrasmallmill.mdl
ERROR!: Can't create physics object for models/props/cs_office/vending_machine.mdl
ERROR!: Can't create physics object for models/props/cs_office/vending_machine.mdl
ERROR!: Can't create physics object for models/props/de_prodigy/transformer.mdl
ERROR!: Can't create physics object for models/props/de_train/acunit1.mdl
ERROR!: Can't create physics object for models/props/cs_office/vending_machine.mdl
ERROR!: Can't create physics object for models/props/cs_office/vending_machine.mdl
ERROR!: Can't create physics object for models/props/de_prodigy/spoolwire.mdl
ERROR!: Can't create physics object for models/props/cs_office/chair_office.mdl
ERROR!: Can't create physics object for models/props/cs_office/sofa.mdl
ERROR!: Can't create physics object for models/props/cs_militia/crate_extrasmallmill.mdl
ERROR!: Can't create physics object for models/props/cs_office/vending_machine.mdl
ERROR!: Can't create physics object for models/props/cs_office/chair_office.mdl
ERROR!: Can't create physics object for models/props/cs_office/table_coffee.mdl
ERROR!: Can't create physics object for models/props/cs_office/chair_office.mdl
ERROR!
it looks like CSS isn't installed
How do I give someone a weapon and take all the ammo away from it?
[lua]ply:Give( "weapon_pistol" )[/lua]
How would I then take all the ammo away from the pistol?
[QUOTE=Hyper Iguana;35268610]How do I give someone a weapon and take all the ammo away from it?
[lua]ply:Give( "weapon_pistol" )[/lua]
How would I then take all the ammo away from the pistol?[/QUOTE]
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index8d04-2.html?title=Player.SetAmmo[/url] - Might work?
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexb761.html?title=Player.StripAmmo[/url] - Removes all ammo from all guns
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index6127.html?title=Player.GiveAmmo[/url] - Integer value so, just place a negative value to remove the given ammo
and this took about one minute to find on the wiki.. It belongs to the same class as ply:Give. Player Class.
[QUOTE=Banana Lord.;35267026]it looks like CSS isn't installed[/QUOTE]
i just installed cstrike dedicated server also, same problem.
CSS has been changed to install to it's own directory that no longer resides in orangebox. I believe you need to move the cstrike folder out of the css folder and into the orangebox folder so it sits alongside the garrysmod folder.
[QUOTE=BlackAwps;35270833]CSS has been changed to install to it's own directory that no longer resides in orangebox. I believe you need to move the cstrike folder out of the css folder and into the orangebox folder so it sits alongside the garrysmod folder.[/QUOTE]
or if you are running linux you can just symlink it (obviously)
[code]cp /home/srcds_content/css/cstrike/ /home/srcds/orangebox/[/code]
that's how my servers are set up
[lua]
CreateConVar( "PlayerNoClipToggle", 0, FCVAR_SERVER_CAN_EXECUTE )
/*---------------------------------------------------------
Name: PlayerNoClip( ply )
Desc: Turns off Noclip
---------------------------------------------------------*/
function PlayerNoClipToggle( ply )
if GetConVarNumber("PlayerNoClipToggle") == 1 then
return true
else
ply:ChatPrint("You are dead!")
end
end
hook.Add("PlayerNoClip", "PlayerNoClipToggle", PlayerNoClipToggle)
[/lua]
It allows noclip and it prints the message. What am I doing wrong?
probably not related but that hook should be shared to stop prediction errors
Try returning false after printing the message?
[QUOTE=Drakehawke;35271969]Try returning false after printing the message?[/QUOTE]
<3
[QUOTE=Banana Lord.;35271966]probably not related but that hook should be shared to stop prediction errors[/QUOTE]
Elaborate please O.o
[QUOTE=Proclivitas;35271989]<3
Elaborate please O.o[/QUOTE]
It looks like you're doing this serverside, which means the client has to wait for the server to tell him he can noclip before noclipping them. This could result in a slight lag or stutter when you press your noclip button.
It's not essential, your code will work perfectly fine without it, however really that hook should be shared (on client and server). This way the client can "predict" whether he can noclip or not, and start the noclip a split second before the server approves it, making it ever so slightly smoother.
If you're unsure just leave it as it is, as I said it's not essential.
[QUOTE=BlackAwps;35270833]CSS has been changed to install to it's own directory that no longer resides in orangebox. I believe you need to move the cstrike folder out of the css folder and into the orangebox folder so it sits alongside the garrysmod folder.[/QUOTE]
thanks what you said was right however i needed to get the whole css dir outside the orangebox folder as well now it works thanks guys!
quick question: is there a way to make me admin of dedicated server so that my in game console could perform all the tasks my dedicated server console could do? or will i need to make an admin menu to perform all the tasks?
[QUOTE=dr.dray_7;35281369]quick question: is there a way to make me admin of dedicated server so that my in game console could perform all the tasks my dedicated server console could do? or will i need to make an admin menu to perform all the tasks?[/QUOTE]
You'll need to set up an rcon password, then time you log in activate it through rcon_password then commands and such in that console. Should be easy to figure out.
What are some entry level/intermediate things to code? I don't want to be creating massive gamemodes here, I just purely want to do this for hobby as I haven't learned lua yet.
[QUOTE=Proclivitas;35285878]What are some entry level/intermediate things to code? I don't want to be creating massive gamemodes here, I just purely want to do this for hobby as I haven't learned lua yet.[/QUOTE]
[url]http://www.lua.org/pil/[/url]
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index2bde.html?title=Lua_Overview[/url]
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index2f64.html?title=Getting_Started_With_Lua[/url]
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index7a06.html?title=Lua_Tutorial_Series[/url]
Where can I find weapon model list?
[QUOTE=Krizzu;35286518]Where can I find weapon model list?[/QUOTE]
For the default models that come with GMod? I just use the spawnmenu in-game. (Right click -> Copy to Clipboard)
Sorry, you need to Log In to post a reply to this thread.