I know this is unlikely but does anyone know where I can find code for a TDM mode for gmod. Something to start off with and build upon.
Noob Here.
Could anyone give me an example of how this line should be in Gmod13? because I get errors.
[lua]
draw.SimpleText("Health: "..client:Health() .. "%", "ScoreboardText", 35, ScrH()-100, Color(250, 230, 10, 255), 0, 0)
[/lua]
@Reload337
Try to create the font "ScoreboardText" , garry removed a lot of fonts
cam3D2D HTML Panel bump...maybe someone has a working code?
How would you resize a player?
I know you should set the Hull, Collisions,View, etc.
I just want to know how to make a player model appear bigger. I know you used to be able to do it with SetModelScale but that no longer works in gmod 13.
[QUOTE=Hyper Iguana;38896609]Does anyone happen to know how to remove the default player description when you hover over someone?[/QUOTE]
function GM:HUDDrawTargetID()
[QUOTE=Hyper Iguana;38896609]Does anyone happen to know how to remove the default player description when you hover over someone?
[img]http://i.imgur.com/y34yL.png[/img]
Only thing I could find is returning false on CHudGMod in the HUDShouldDraw hook, which did work, but also disabled anything I drew with draw.* aswell.[/QUOTE]
[url=http://www.glua.me/bin/?path=/gamemodes/base/gamemode/cl_targetid.lua]Override GM:HUDDrawTargetID[/url]
How do I make it so I can actually start up a game when there are script errors. I need to fix a script and it puts me back in the main menu without actually starting it.
[QUOTE=The freeman;38898026]How do I make it so I can actually start up a game when there are script errors. I need to fix a script and it puts me back in the main menu without actually starting it.[/QUOTE]
sv_kickerrornum 0?
Alright, thanks. Having a new problem. I am dicking around with some stuff converting from GM12 to GM13. I am getting the error:
[code]
[ERROR] lua/autorun/client/gld.lua:666: attempt to call upvalue 'ValidEntity' (a nil value)
1. v - lua/autorun/client/gld.lua:666
2. unknown - lua/includes/modules/hook.lua:82
[ERROR] lua/autorun/client/gld.lua:479: attempt to call upvalue 'ValidEntity' (a nil value)
1. v - lua/autorun/client/gld.lua:479
2. unknown - lua/includes/modules/hook.lua:82
[/code]
Lines in question:
[lua]
479: local function ScanOff()
666: lastact = CurTime() + GetSetting("spamanim_delay",false)
[/lua]
Any ideas?
[QUOTE=The freeman;38898233]Alright, thanks. Having a new problem. I am dicking around with some stuff converting from GM12 to GM13. I am getting the error:
[code]
[ERROR] lua/autorun/client/gld.lua:666: attempt to call upvalue 'ValidEntity' (a nil value)
1. v - lua/autorun/client/gld.lua:666
2. unknown - lua/includes/modules/hook.lua:82
[ERROR] lua/autorun/client/gld.lua:479: attempt to call upvalue 'ValidEntity' (a nil value)
1. v - lua/autorun/client/gld.lua:479
2. unknown - lua/includes/modules/hook.lua:82
[/code]
Lines in question:
[lua]
479: local function ScanOff()
666: lastact = CurTime() + GetSetting("spamanim_delay",false)
[/lua]
Any ideas?[/QUOTE]
ValidEntity was removed and replaced with IsValid, just do a replace through the whole file
those lines aren't the ones in question, but you need to replace ValidEntity with IsValid
Works fine now, thanks.
By the way, why was ValidEntity renamed to IsValid?
iirc ValidEntity was an alias for IsValid, and that alias was removed in GMod 13
Hey, I need help with this.
local maxitems = CreateConVar( "drp_maxitems", "15", { FCVAR_REPLICATED, FCVAR_ARCHIVE } )
local maxguns = CreateConVar( "drp_maxguns", "4", { FCVAR_REPLICATED, FCVAR_ARCHIVE } )
This is a inventory system and these 2 lines represent de maximum capacity of your inventory.
I want for premiums/donators increased.
My premium and admin codes that should probably be used:
function(ply) return ply:GetUserGroup() == "premium" or ply:IsAdmin() end
Thanks for helping me.
- Ryan Stealth
[QUOTE=reenesj;38899346]Hey, I need help with this.
local maxitems = CreateConVar( "drp_maxitems", "15", { FCVAR_REPLICATED, FCVAR_ARCHIVE } )
local maxguns = CreateConVar( "drp_maxguns", "4", { FCVAR_REPLICATED, FCVAR_ARCHIVE } )
This is a inventory system and these 2 lines represent de maximum capacity of your inventory.
I want for premiums/donators increased.
My premium and admin codes that should probably be used:
function(ply) return ply:GetUserGroup() == "premium" or ply:IsAdmin() end
Thanks for helping me.
- Ryan Stealth[/QUOTE]
Why don't you give us all of the code you've gotten so far and we'll help you from there.
[QUOTE=Hyper Iguana;38899460]Why don't you give us all of the code you've gotten so far and we'll help you from there.[/QUOTE]
That's basicly all I have.
What else do you really need?
[QUOTE=reenesj;38899544]That's basicly all I have.
What else do you really need?[/QUOTE]
There's really nothing to work off of.
[QUOTE=Hyper Iguana;38899797]There's really nothing to work off of.[/QUOTE]
Mate, That is basicly all you need if you understand what I asked though. :S
local maxitems = CreateConVar( "drp_maxitems", "15", { FCVAR_REPLICATED, FCVAR_ARCHIVE } )
now the maximum is 15 items
[QUOTE=reenesj;38899839]Mate, That is basicly all you need if you understand what I asked though. :S
local maxitems = CreateConVar( "drp_maxitems", "15", { FCVAR_REPLICATED, FCVAR_ARCHIVE } )
now the maximum is 15 items[/QUOTE]
If you're telling me what I think you're telling me then the answer is to just create a second ConVar.
That probably could be done, I just have trouble making the second convar for only premiums, admins and superadmins.
[QUOTE=Hyper Iguana;38899941][lua]
local maxitemsDoner = CreateConVar( "drp_maxitems_d", "20", { FCVAR_REPLICATED, FCVAR_ARCHIVE } )
local maxitemsAdmin = CreateConVar( "drp_maxitems_a", "25", { FCVAR_REPLICATED, FCVAR_ARCHIVE } )
[/lua][/QUOTE]
local maxitems and local maxguns
is used inside of commands to stop people from stuffing more inside of there inventory.
And how will ulx or gmod know that drp_maxitems_d or local maxitemsDoner is a Donator?
How can I make it so only an individual will regenerate health, rather than everyone?
[lua]function ITEM:OnEquip(ply, modifications)
ply:PS_AddClientsideModel(self.ID)
function HPregen( ply )
if ply:Alive() then
ply:SetHealth(ply:Health() + 1)
end
end
timer.Create("timer1", 1, 0, HPregen)
timer.Start("timer1")
end
function ITEM:OnHolster(ply)
ply:PS_RemoveClientsideModel(self.ID)
timer.Destroy("timer1")
end[/lua]
How do I use a material that's outside the material's folder? Trying to get the png map icons from the /maps folder.
Edit Nvm, figured it out. Hooray for "../"!
I'm attempting to make an effect or partical whatever you guys call it follow my character around for a sort of "aura" .. Well pretty much an aura, but I'm totally clueless in the Emitting area..
Anybody willing to help a poor old silly Australian? Haha!
How is Entity:WorldToLocal( pos ) and Entity:LocalToWorld( pos ) calculated?
Does anyone have a smart idea rendering 2 models in one a modelpanel?
I've made my own modelpanel, but the real problem is that i need to attach the first model to the second one.
And because ClientsideModels don't have real position, they just render on top of eachother.
[QUOTE=ollie;38905186]Does anyone have a smart idea rendering 2 models in one a modelpanel?
I've made my own modelpanel, but the real problem is that i need to attach the first model to the second one.
And because ClientsideModels don't have real position, they just render on top of eachother.[/QUOTE]
They do have a real position, say you want them next to each other, do (for example) ent2:SetPos( ent1:GetPos() + Vector( 50, 0, 0 ) ) then include the call to ent2:DrawModel() in the DModelPanels paint function
[url]http://glua.me/bin/?path=/lua%2Fvgui%2Fdmodelpanel.lua[/url]
[editline]20th December 2012[/editline]
To explain a bit more, the clientside entities are created in the world at 0, 0, 0, then they're set invisible and drawn in a 3D cam in the panel instead.
[QUOTE=Drakehawke;38905215]They do have a real position, say you want them next to each other, do (for example) ent2:SetPos( ent1:GetPos() + Vector( 50, 0, 0 ) ) then include the call to ent2:DrawModel() in the DModelPanels paint function
[url]http://glua.me/bin/?path=/lua%2Fvgui%2Fdmodelpanel.lua[/url]
[editline]20th December 2012[/editline]
To explain a bit more, the clientside entities are created in the world at 0, 0, 0, then they're set invisible and drawn in a 3D cam in the panel instead.[/QUOTE]
Oh right, I'm stupid.
Thanks again Drakehawke!
[QUOTE=Drakehawke;38905215]They do have a real position, say you want them next to each other, do (for example) ent2:SetPos( ent1:GetPos() + Vector( 50, 0, 0 ) ) then include the call to ent2:DrawModel() in the DModelPanels paint function
[url]http://glua.me/bin/?path=/lua%2Fvgui%2Fdmodelpanel.lua[/url]
[editline]20th December 2012[/editline]
To explain a bit more, the clientside entities are created in the world at 0, 0, 0, then they're set invisible and drawn in a 3D cam in the panel instead.[/QUOTE]
Thanks, I've been trying to do this for a while!
Sorry, you need to Log In to post a reply to this thread.