Nope, you will have to wait until they're fully connected.
Does game.KickID do what you want?
Damn... Thx for the reply
hello I'm new to coding so I know very little about it and I bought a basewars gamemode. I cant seem to figure out how to make an override code for a moneyprinter that I made basically I just copy and pasted one of the other printers and edited it to my likings I don't get any error codes in console etc. but my issue is it keeps repeating the capacity from 0/-2.1billion to -2.1billion/-2.1billion basically meaning I cant do anything with it other then sell it. yes I have set the amount it can hold to over 2.1 billion it is at like 13 billion and it just pops that up when I buy it(spawns in server). any help in understanding this would be greatly appreciated ive searched for days and only find thins on darkrp money printers that have 3 files cl_init, init, and shared.lua when my printer only has 1 .lua file same goes for the rest of them if it helps its the hexahedron basewars file from the gmod store.
Well, as for what I requested help for earlier, I was hoping to solve my issue without creating any more variables... but I got it working once I gave up and added a new float variable.
How could i make GetEyeTrace make a little box popup when looking at an entity called rock
Draw the name of the entity in a HUDPaint hook.
Hey I just wonder how to make a "chat history" for a player. So if you press "KEY_UP" your last sent messages will show and go into the chatbox and if you press again the message before and so on.
I thought about putting every player in a table and add to it a table with every sent chat message. But I don't know how to start or wether it is a good way to do it..
@Alphaverse I think that is something that needs it's own thread tbh. The default chat box already stores previous messages and you can scroll up and down. There might be a way to code it so that players can turn on a filter so they only see their messages.
Dividing anything above 1 will go left, use decimals
another question: How would I clear and then update the text inside a panel that uses draw.SimpleText to display player name and score inside the panel?
For example: I have the scoreboard panel open, but when I add bots to the server I can't see them pop up on the scoreboard panel unless I close it and reopen it. How do I make it live without drawing hundreds of panels or making the panel strobe? I just want it to effect draw.SimpleText
if the panel has text using draw.SimpleText, it is probably using PANEL/Paint, which is called every frame. just use that
oof sorry I didn't see your edit on the other topic. I was thinking about rigging it to a fade system like the killfeed has (just the text though) any idea how I could do that for this?
for k,v in pairs(player.GetAll()) do --[[`for k,v` means each time this is run, `k` will be a number and `v` will be the player itself.]]
local PlayerPanel = vgui.Create("DPanel", PlayerList)
PlayerPanel:SetSize(PlayerList:GetWide(), 30)
PlayerPanel:SetPos(0,0)
PlayerPanel:SizeToContents()
PlayerPanel.Paint = function(self,w,h)--[[Panel:Paint you were talking about]]
if k <= 3 then
local score = v:Frags() * 200 - v:Deaths() * 300 --v is the player.
draw.RoundedBox( 0, 0, 0, PlayerPanel:GetWide(), PlayerPanel:GetTall(), Color( 50, 50, 50, 255))
draw.RoundedBox(0, 0, 29, PlayerPanel:GetWide(), 1, Color(255, 255, 255, 255))
draw.SimpleText(v:GetName().." Score: "..score,"Default2", 10, 10, Color(255, 255, 255 ))
--I just want it to effect SimpleText I attempted to link it to CurTime() but the entire panel started closing and opening every milisecond
else
local score = v:Frags() * 200 - v:Deaths() * 300
draw.RoundedBox(0, 0, 29, PlayerPanel:GetWide(), 1, Color(255, 255, 255, 255))
draw.SimpleText(v:GetName().." Score: "..score,"Default2", 10, 10, Color(255, 255, 255 ))
Is it just me or setting channels on EmitSound in weapons does not make a difference? For example, here the AR2 empty sound will always cut off the weapon's firing sound:
self:EmitSound(self.Primary.Sound,100,math.random(97,102))
if self:Clip1() <= (self.Primary.ClipSize/4) then
self:EmitSound( "Weapon_AR2.Empty", 75, 100, 1, CHAN_VOICE2 )
end
Iirc certain channels only exist on certain entities - it's a really messy system.
Does anyone know how I can update a line in DListView. I am using it for my scoreboard and I do not like the self:Clear() stuff I do with it as every time it runs it just looks like it is having a seizure.
How do i make Entitys only spawnable my Admins? You know, that little gold shield icon in the corner.
I thought its done with ENT.AdminSpawnable = true
but it seems thats not getting regognized...
It's ENT.AdminOnly
aw fuck yea. gmod wiki wasnt helpfull on that AT all..and you answer all my questrions huh? XD
ENT Structure
Quick question:
Can I combine Entity/PhysicsInitBox
And render.DrawBox
And maybe ENTITY/PhysicsSimulate
To create an interactable custom size rectangle, using a placeholder entity with no physics?
If so, I have the best idea for a base building thingy.
PhysicsInitBox creates physics for the entity.
I’ve been having the same idea for some time and have been too lazy to look into! Lmk if you start for some competition ;)
I posted an example to the Wiki for something close to this: http://wiki.garrysmod.com/page/Global/CreatePhysCollideBox.
I mean that before you do PhysicsInitBox it has no physics, or alternatively it does and you overwrite it.
It's ON!
Thank you SO much! That's amazing!
Not Lua related, but still Gmod:
I try to move the project on an other hard drive (an SSD so git is more responsive). I MKLink the directory in my gamemode folder to be able to work directly on it.
The Gamemode itself load fine, but when i call DeriveGamemode, Gmod can't find the the base, even if it's here.
Both the Gamemode and his base are symlink.
Is this a limitation from Gmod or I am doing something wrong?
Spec: Windows 10
Is there an easy way to detect when some force is applied to entity? Yes, I can override default Entity/SetVelocity function, but will it affect every source of force?
This question may be 101% dumb, I was just thinking about it and I can't run gmod right now to test anything.
GM:ForceApplied(ent, vec, ang) is the dream
I don't think there's a way, especially since there's multiple ways to apply a force (physobj forces).
Sorry, you need to Log In to post a reply to this thread.