• What do you need help with? V3
    6,419 replies, posted
[QUOTE=Annoyed Tree;39701057]-snip-[/QUOTE] Yeah I had that problem about a week ago, I think it may be a bug.
With my custom TTT weapons, instead of holding it in the player's hands, other players will see the gun sticking out of the center of the person holding the gun's chest. What should I put in my shared.lua of the weapon of just in any file to fix this?
[QUOTE=LilSumac;39702769]With my custom TTT weapons, instead of holding it in the player's hands, other players will see the gun sticking out of the center of the person holding the gun's chest. What should I put in my shared.lua of the weapon of just in any file to fix this?[/QUOTE] Did you set the hold-type or whatever? [editline]24th February 2013[/editline] [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexaeaf.html[/url]
How do you spawn a vehicle through lua? It's been a while since I've touched GMod so I can't remember much :v:
ents.Create("prop_vehicle_jeep")
[QUOTE=>>;39702795]Did you set the hold-type or whatever? [editline]24th February 2013[/editline] [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexaeaf.html[/url][/QUOTE] I did, I even created a Initialize function inside the shared.lua that set it as well. The person has their arms down at their sides and the weapon is poking out the front of their chest. EDIT: My mistake, their hands are in the correct position, but the gun isn't.
[QUOTE=>>;39703911]ents.Create("prop_vehicle_jeep")[/QUOTE] I got it, it required a script and such, thanks though! Now for another problem, I'm trying to create a cannon but I can't seem to get it to launch, I've tried a ton of methods but I just can't seem to figure it out. Here's the code: [lua] function ENT:DoBomb() local bomb = ents.Create("ent_bomb") bomb:SetMoveType(MOVETYPE_FLY) bomb:SetPos(self:GetPos()) bomb:Spawn() bomb:Activate() bomb:SetAngles(self:GetAngles()) bomb:SetLocalVelocity(bomb:GetForward()*100) constraint.NoCollide(bomb,self,0,0) constraint.NoCollide(bomb,self.LinkedVehicle,0,0) self:EmitSound("weapons/ar2/ar2_altfire.wav") local effectdata = EffectData() effectdata:SetOrigin( self:GetPos() ) effectdata:SetScale( 0.1 ) util.Effect( "HelicopterMegaBomb", effectdata ) end [/lua] it just flops to the floor at the moment... - Other thing too, I'm trying to get a turret to shoot that's linked up with a seat, it works so far but it shoots in the wrong direction. I'm trying to shoot rounds off from the muzzle but it's shooting in weird directions... Here's the code: [lua] function ENT:ShootBullet( damage, num_bullets, aimcone ) local muzzle = self:GetAttachment(1) PrintTable(muzzle) local bullet = {} bullet.Num = num_bullets bullet.Src = muzzle.Pos bullet.Dir = muzzle.Ang:Forward() bullet.Spread = Vector( aimcone, aimcone, 0 ) bullet.Tracer = 5 bullet.TracerName = "Tracer" bullet.Force = 1 bullet.Damage = damage bullet.AmmoType = "Pistol" self.Eyes:FireBullets( bullet ) end [/lua]
[QUOTE=LilSumac;39703937]I did, I even created a Initialize function inside the shared.lua that set it as well. The person has their arms down at their sides and the weapon is poking out the front of their chest. EDIT: My mistake, their hands are in the correct position, but the gun isn't.[/QUOTE] You're using a world model that isn't compatible with the GMOD playermodel's skeleton.
I'm curious, how do I make a gun fire a 3-4 shot burst, using the TTT weapon base?
[QUOTE=xjokerx9;39635961]I've tried adding this to my DarkRP but, when it just so happens that if the attacker is a CP or not he will still become wanted. Any help? [lua] function WarrantShooter(target, dmginfo) local attacker = dmginfo:GetAttacker() if attacker:IsCP() then return false elseif attacker:IsValid() && attacker:IsPlayer() && target:IsCP() then attacker:SetDarkRPVar("wanted", true) attacker:SetDarkRPVar("wantedReason", "Attacked Government Official") timer.Create(attacker:UniqueID() .. " wantedtimer", GAMEMODE.Config.wantedtime, 1, function() TimerUnwanted(ply, attacker) end) end end hook.Add("EntityTakeDamage", "WarrantShooter", WarrantShooter) [/lua][/QUOTE] Posted this a few days back..any help?
[QUOTE=skullorz;39705087]You're using a world model that isn't compatible with the GMOD playermodel's skeleton.[/QUOTE] How would I fix such a thing?
What would cause a player to spawn without Keys in DarkRP? I can also not spawn a moneyprinter or ammo.
Alright, I've been getting non stop requests for this on my Workshop addons so I'm going to ask the Lua geniuses in this section. I am by no means a programmer. I've only had 32 hours of a programming couse in college, and a lot of that time wasn't going over actual programming. I just need help making a simple NPC. I want to make some models use Combine AI, but be allied to the player at the same time. Another thing they would like to have is some custom sounds. All I really need is to get the Combine AI in these NPCs to be allied to the player. Any help with this would be greatly appreciated. Thanks guys.
Need some help, how would I go about displaying a players model within a dermapanel? I tried the tutorial on the wiki it just did not work out well.
[QUOTE=Gmremie;39707219]Need some help, how would I go about displaying a players model within a dermapanel? I tried the tutorial on the wiki it just did not work out well.[/QUOTE] Post some code, why didn't it go well ? Errors ?
Sorry for asking this but how would I make it so that when people votemap using ULX and the vote for a specific map is accepted, it doesn't change in the middle of the TTT round but instead when the round is over?
I'm working on a gamemode, and whenever I press the chat key my screen spins around and it disables the ESC key. Anyone know why this is happening?
[QUOTE=LilSumac;39705300]How would I fix such a thing?[/QUOTE] Well there is a tool I saw in the workshop that allows you to create custom world models and fix them so I think you should look for one in the workshop.
-snip- Buttons are "C_BaseEntity" on the client and "func_button" on the server.
Could anyone help me with scale ? I am trying to make something but the problem is when I change the resolution the bar is moved. For example I did something like this which is working [LUA]draw.RoundedBoxEx(10,ScrW() * 0.5 - 485/2,ScrH() - 85,485,85,Color(74,74,74,200),true,true,false,false)[/LUA] But how do I scale panels,frames,simpletext,WordBox. I tried to find different things about Scale but I failed.
Is there a way to have multiple sequences playing on one model, like in the model viewer? Let's say, for example, on a TF2 Soldier, stand_primary (which is the normal rocket launcher stand pose) and reloadstand_primary_loop (which is just his arm moving [I]and nothing else[/I]), so when you'd play them at the same time you'd get the full reload animation. Google and the wiki both turned up nothing, so I'm out of ideas here.
I need to know if there is anyway to disable (like grey them out or something) derma controls when a user clicks something in a combo box. Is there anything that will allow me to do that?
[QUOTE=Arctiq;39715990]I need to know if there is anyway to disable (like grey them out or something) derma controls when a user clicks something in a combo box. Is there anything that will allow me to do that?[/QUOTE] What control do you want to disable?
I want to implement a text box in my GUI, but I want to have multiple lines, do I need to implement word wrapping myself or is there something else I can use?
This might be a noob question, but I'm trying to set up an sv_loadingurl for my DarkRP server. I just want to display a picture and automatically resize it to the connecting player's screen. I have the picture uploaded to Imgur, but it doesn't seem resize to the screen. (I don't know much at all about websites and HTML, I know more Java and Lua.) Can anyone tell me how to do this? By the way, I'm using a direct link; something like [url]http://i.imgur.com/XXXXXXX.png[/url] [B]Shit, I keep typing downloadurl instead or loadingurl. I already have a downloadurl... :S[/B]
[QUOTE=RaceProKid;39724137]This might be a noob question, but I'm trying to set up an sv_downloadurl for my DarkRP server. I just want to display a picture and automatically resize it to the connecting player's screen. I have the picture uploaded to Imgur, but it doesn't seem resize to the screen. (I don't know much at all about websites and HTML, I know more Java and Lua.) Can anyone tell me how to do this?[/QUOTE] Does it just use basic html?
[QUOTE=ShoTGuNGuY49;39725325]Does it just use basic html?[/QUOTE] Do you mean something like "<a href="http://imgur.com/XXXXXXX"><img src="http://i.imgur.com/XXXXXXX.png" alt="" title="Hosted by imgur.com" /></a>"? Then yeah. Do I replace the direct link in sv_loadingurl "[direct link]" with the HTML code? Why did someone disagree? It's not something to disagree to. It's something to reply to and help with.
Does anyone know the formula for converting SteamID64 to SteamID (STEAM_0:0:X:XXXXX). I thought it was like this: [code]function ConvertSteamId(id) local a = id - 76561197960265728 local b = a / 2 local d = a % 2 == 0 and 0 or 1 return "STEAM_0:" .. d .. ":" .. math.floor(b) end[/code] But it's not working for all of them.
[QUOTE=RaceProKid;39725516]Do you mean something like "<a href="http://imgur.com/XXXXXXX"><img src="http://i.imgur.com/XXXXXXX.png" alt="" title="Hosted by imgur.com" /></a>"? Then yeah. Do I replace the direct link in sv_downloadurl "[direct link]" with the HTML code?[/QUOTE] Try using the page source from [url=http://www.daftpunk.com/]this site[/url].
[QUOTE=hemirox;39725823]Does anyone know the formula for converting SteamID64 to SteamID (STEAM_0:0:X:XXXXX). I thought it was like this: [code]function ConvertSteamId(id) local a = id - 76561197960265728 local b = a / 2 local d = a % 2 == 0 and 0 or 1 return "STEAM_0:" .. d .. ":" .. math.floor(b) end[/code] But it's not working for all of them.[/QUOTE] [url]https://developer.valvesoftware.com/wiki/SteamID#Steam_ID_as_a_Steam_Community_ID[/url]
Sorry, you need to Log In to post a reply to this thread.