• What do you need help with? V3
    6,419 replies, posted
Hey, I'm trying to get "pointshop" on my server but everytime people connect they are automatically disconnected due to too many lua errors. Couldn't include file 'includes\modules\datastream.lua' (File not found) (@addons/pointshop/lua/autorun/pointshop.lua (line 1)) [ERROR] addons/pointshop/lua/autorun/pointshop.lua:1: Module not found! 1. require - [C]:-1 2. unknown - addons/pointshop/lua/autorun/pointshop.lua:1
Datastream was removed in favour of the net library.
[QUOTE=Alex_grist;38637954]Datastream was removed in favour of the net library.[/QUOTE] Yeah i just found this out, I'm not entirely sure how to switch over to net though.
I could need some bright lua brains to look at some peace of code :) [url]http://www.facepunch.com/showthread.php?t=1229063[/url]
[QUOTE=robz;38638012]Yeah i just found this out, I'm not entirely sure how to switch over to net though.[/QUOTE] You're using the old version. New version: [url]http://www.facepunch.com/showthread.php?t=1228438[/url]
[QUOTE=_Undefined;38638761]You're using the old version. New version: [url]http://www.facepunch.com/showthread.php?t=1228438[/url][/QUOTE] Ah so i am, thanks dude. Your probably the guy to ask, do you have a little bit of code for giving players points over time?
[QUOTE=robz;38639293]Ah so i am, thanks dude. Your probably the guy to ask, do you have a little bit of code for giving players points over time?[/QUOTE] Yup. In that thread.
I'm making a swep from, damn them... Halo Sweps. I keep getting an error with the line [code] local ang = (traceRes.HitPos - frball.startpos):GetNormalized()[/code] ... It's been a long time since I've posted. I tried to debug it with print( "what it is: " <code> ), but that returned new errors. Future errors are expected, but please help me! &#21161;&#12369;&#12390;&#65281;
[QUOTE=luavirusfree;38642220]I'm making a swep from, damn them... Halo Sweps. I keep getting an error with the line [code] local ang = (traceRes.HitPos - frball.startpos):GetNormalized()[/code] ... It's been a long time since I've posted. I tried to debug it with print( "what it is: " <code> ), but that returned new errors. Future errors are expected, but please help me! &#21161;&#12369;&#12390;&#65281;[/QUOTE] If you want help with errors then post the errors and all the code that is involved.
Bah... Okay, but there are two files. What I want is a base to a projectile weapon, or a projectile weapon. It's not easy to search this website with my low privileges. shares.lua : [code]if ( SERVER ) then AddCSLuaFile( "shared.lua" ) AddCSLuaFile( "cl_init.lua" ) SWEP.HoldType = "fist" end if ( CLIENT ) then SWEP.Category = "Mario Powers" SWEP.PrintName = "Fire" SWEP.Author = "Skyler" SWEP.Contact = "None yet." SWEP.Purpose = "FireBalls!" SWEP.Instructions = "Shoot with primary fire. They bounce, so try not to hurt yourself!" SWEP.CSMuzzleFlashes = false SWEP.ViewModelFOV = 70 SWEP.Slot = 1 SWEP.SlotPos = 0 end SWEP.HoldType = "fist" --function SWEP:Precache() -- util.PrecacheSound("weapons/pistol_fire.wav") -- util.PrecacheSound("weapons/pistol_melee.wav") -- util.PrecacheSound("weapons/pistol_impact.wav") -- util.PrecacheSound("weapons/pistol_reload.wav") -- util.PrecacheSound("weapons/pistol_ready.wav") -- util.PrecacheModel("models/Weapons/v_m6d.mdl") -- util.PrecacheModel("models/Weapons/w_m6d.mdl") --end --SWEP.data = {} --SWEP.data.newclip = false SWEP.Spawnable = false SWEP.AdminSpawnable = true SWEP.ViewModel = "models/Weapons/v_hands.mdl" SWEP.WorldModel = "models/Weapons/w_grenade.mdl" SWEP.ViewModelFlip = false SWEP.Drawammo = false SWEP.DrawCrosshair = false SWEP.Weight = 5 SWEP.AutoSwitchTo = false SWEP.AutoSwitchFrom = false SWEP.Primary.Sound = Sound( "npc/vort/vort_attack_shoot2.wav" ) SWEP.Primary.Recoil = 0.2 SWEP.Primary.Damage = 0 SWEP.Primary.NumShots = 0 SWEP.Primary.Cone = 0.0 SWEP.Primary.ClipSize = 4 SWEP.Primary.Delay = 0.4 SWEP.Primary.DefaultClip = 4 SWEP.Primary.Automatic = false SWEP.Primary.Ammo = "none" SWEP.Secondary.ClipSize = 3 SWEP.Secondary.DefaultClip = 3 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" function SWEP:Initialize() if (SERVER) then self:SetWeaponHoldType(self.HoldType) end end function SWEP:SecondaryAttack() -- self.Owner:SetAnimation( PLAYER_ATTACK1 ) end function SWEP:PrimaryAttack() if ( !self:CanPrimaryAttack() ) then return end self.Weapon:EmitSound(self.Primary.Sound) -- self:ShootBullet( 0, self.Primary.NumShots, self.Primary.Cone ) self:TakePrimaryAmmo( 1 ) --self.Owner:ViewPunch( Angle( -0.50, 0, 0 ) ) self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay ) local shotpos = self.Owner:GetShootPos() local frball = {} -- frball.startpos = PlayerPos + PlayerAng:GetNormalized()*16 local traceRes = self.Owner:GetEyeTrace() print( "Trace Res: "..traceRes.HitPos ) print( "Fireball Start: "..frball.startpos ) print( "Outcome: "..(traceRes.HitPos - frball.startpos):GetNormalized() ) local ang = (traceRes.HitPos - frball.startpos):GetNormalized() local fball = ents.Create("mariofire") if (ValidEntity(fball)) then fball:SetPos(shotpos) fball.Owner = self.Owner end frball:SetPos( shotpos ) end function SWEP:ShootBullet( damage, num_bullets, aimcone ) local bullet = {} bullet.Num = num_bullets bullet.Src = self.Owner:GetShootPos() bullet.Dir = self.Owner:GetAimVector() bullet.Spread = Vector( aimcone, aimcone, 0 ) bullet.Tracer = 5 bullet.Force = 0 bullet.Damage = 19 bullet.AmmoType = self.Primary.Ammo self.Owner:FireBullets( bullet ) self:ShootEffects() -- Obsolete. Do NOT use for fireballs. end function SWEP:ShootEffects() self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) -- self.Owner:MuzzleFlash() self.Owner:SetAnimation( PLAYER_ATTACK1 ) end function SWEP:Reload() --if self.Owner:GetActiveWeapon():Clip1() == 0 then return end if self.Owner:GetActiveWeapon():Clip1() < 3 then return end if self.Reloading then return end if self.Weapon:Clip1() < 3 then -- bZoomed = false if (SERVER) then self.Owner:SetFOV( 0, 0.35 ) self.Owner:DrawViewModel(true) end self:SetClip1( 3 ) -- self.data.oldclip = self.Weapon:Clip1() -- self.Weapon:EmitSound(Sound("weapons/pistol_reload.wav")) -- self.Weapon:DefaultReload(ACT_VM_RELOAD) -- self.data.newclip = 1 end end[/code] Tell me if you need client, I didn't change it.
[QUOTE=luavirusfree;38642275]It's not easy to search this website with my low privileges.[/QUOTE] I disagree, you can use [URL="https://www.google.ca/#hl=en&tbo=d&sclient=psy-ab&q=+site:facepunch.com+search+shit&oq=+site:facepunch.com+search+shit&gs_l=serp.12...2404.3735.0.5083.11.11.0.0.0.1.226.1046.8j2j1.11.0.les%3B..0.0...1c.1.BHiGKtaSgJY&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=35e5ed9417e1ece2&bpcl=39314241&biw=1600&bih=733"]this[/URL].
Yeah, that's what I do... It's HORRIBLE at finding sweps. &#12384;&#12363;&#12425;&#12289;&#12393;&#12398;&#12367;&#12425;&#12356;&#31169;&#12399;&#21161;&#12369;&#12434;&#24453;&#12388;&#12409;&#12365;&#12391;&#12375;&#12423;&#12358;&#12363;&#65311; So, how long should I wait for help? ...Still waiting.
Where do i put custom sounds for weapons for a TTT Swep, been at this for more than an hour cant find where to put it PLEASE HELP!!!!!!!
terrortown/content/sounds/somefolder [editline]29th November 2012[/editline] Anyone know how to make clientside first person animations? like how you run with your gun for customizable weaponry and such. I'm really curious to learn how.
[QUOTE=luavirusfree;38642220]I'm making a swep from, damn them... Halo Sweps. I keep getting an error with the line [code] local ang = (traceRes.HitPos - frball.startpos):GetNormalized()[/code] ... It's been a long time since I've posted. I tried to debug it with print( "what it is: " <code> ), but that returned new errors. Future errors are expected, but please help me! &#21161;&#12369;&#12390;&#65281;[/QUOTE] On a guess, you should probably be using :GetNormal() instead of :GetNormalized().
Does anyone know where i can find a hud that shows me the health of an npc im looking at, or something like that? I had one for gmod 12 but for some inexplicable reason it has broken.
^I've seen that before. Search for it, or make it! ... But I do recall there being a problem with npc:GetHealth() ... It's been too long. Okay, well now I need to remove the Print lines... Then I'll check for more errors. [ERROR] lua/weapons/mario_fireballs/shared.lua:94: bad argument #2 to '__sub' (Vector expected, got nil)
[QUOTE=luavirusfree;38642545]So, how long should I wait for help? ...Still waiting.[/QUOTE] You never told us what errors you're getting.
That's the error... Still. [code][ERROR] lua/weapons/mario_fireballs/shared.lua:94: bad argument #2 to '__sub' (Vector expected, got nil)[/code] I removed ized. It now says normal.
As the error says frball.startpos is not a vector and is in fact nil. This is because you commented out the line where it is defined.
Lol... time to test. It's meant to be shotpos. [editline]30th November 2012[/editline] And nowm ,,, [code][ERROR] lua/weapons/mario_fireballs/shared.lua:96: attempt to call global 'ValidEntity' (a nil value) 1. unknown - lua/weapons/mario_fireballs/shared.lua:96 Failed to load sound "npc ort ort_explode2.wav", file probably missing from disk/repository[/code] [editline]30th November 2012[/editline] I may have fixed that... I need to check the sound, but many haven't been playing.
Replace ValidEntity with IsValid.
No, the sound is correct. How do I fix that? (Threat link, perhaps?)
How i can get the life time of the entity
I have an entity that is a football, I want to make it so that when I hit the ball with a crowbar it will move. I think the only way to do this and how it's done in CSS football maps is to use phys_pushscale _.. I can't get this to work on my entity for some reason it just doesn't shift, I can walk into it and it'll move and stuff. Any ideas?
How can I make an entity not collide with players, yet still call ENT.StartTouch when a player goes through it?
[QUOTE=.\\Shadow};38646769]How can I make an entity not collide with players, yet still call ENT.StartTouch when a player goes through it?[/QUOTE] setting the collision groups into debris [LUA]ent:SetCollisionGroup(COLLISION_GROUP_DEBRIS)[/LUA]
Does anyone know how to make the new Drive library do a vehicle that doesn't noclip through everything?
is there any CalculateForceOffset documentation anywhere? or does anyone know how to use it?
[QUOTE=gonzalolog;38646991]setting the collision groups into debris[/QUOTE] Doesn't work, COLLISION_GROUP_WEAPON also does not work.
Sorry, you need to Log In to post a reply to this thread.