1. Post #521
    Gold Member
    ralle105's Avatar
    October 2005
    4,648 Posts
    Can you send the client a Lua module with AddCSLuaFile?
    I don't see why not.
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Agree Agree x 2 (list)

  2. Post #522
    Vend's Avatar
    January 2012
    12 Posts
    Is it possible to play a scene on model in DModelPanel?
    Code:
    local icon = vgui.Create( "DModelPanel", window )
    icon:SetModel( "models/breen.mdl" )
    icon.Entity:ResetSequence("scenes/Breencast/collaboration.vcd");
    ^ won't work.
    Code:
    local icon = vgui.Create( "DModelPanel", window )
    icon:SetModel( "models/breen.mdl" )
    icon.Entity:PlayScene("scenes/Breencast/collaboration.vcd");
    ^ won't work too.
    Reply With Quote Edit / Delete Windows 7 Russian Federation Show Events

  3. Post #523
    Fight for justice, fight for Manning and Snowden.
    Persious's Avatar
    April 2010
    2,597 Posts
    Is it possible getting a entities position?

    print("\n\nAI_MARKET_SELLER POSITION: " .. Market:GetPos())
    

    attempt to concatenate a userdata value.
    Reply With Quote Edit / Delete Windows 7 Faroe Islands Show Events

  4. Post #524
    PENISCORP DIRECTOR
    Gran PC's Avatar
    August 2007
    3,114 Posts
    print("\n\nAI_MARKET_SELLER POSITION: " .. tostring(Market:GetPos())
    Reply With Quote Edit / Delete Windows 7 Spain Show Events Funny Funny x 3Friendly Friendly x 1 (list)

  5. Post #525
    Casual Bananas
    E X C L's Avatar
    February 2011
    1,716 Posts
    You forgot a )
    Reply With Quote Edit / Delete Mac Netherlands Show Events Agree Agree x 4Lua King Lua King x 1Dumb Dumb x 1Friendly Friendly x 1 (list)

  6. Post #526
    Fight for justice, fight for Manning and Snowden.
    Persious's Avatar
    April 2010
    2,597 Posts
    Ah, thanks. Finally got it printing :P

    Edited:

    Okay, this is weird. It does create the entity, and set it's position, but somehow the NPC doesn't show up on the location?

    function GM:InitPostEntity( )
    
    	local sPos	= ents.FindByClass( LastStand.Config.SellerEntity )
    	
    	if ( #sPos < 1 ) then return end
    	
    	local Market	= ents.Create( "npc_citizen" )
    	
    	Market:SetPos( Vector( -372.880798, 108.543587, 128.031250 ) ) --sPos[ math.random( 1, #sPos ) ]:GetPos( )
    
    	Market:SetAngles( Angle( 0, 90, 0 ) )
    	
    	Market:Spawn( )
    	Market:Activate( )
    	
    	if ( !Market:IsOnGround( ) ) then
    	
    		Market:DropToFloor( )
    		
    	end
    	
    	Market:SetName( "ai_market_seller" )
    	
    	Market:SetModel( LastStand.Config.SellerModel )
    
    	print("\n\nAI_MARKET_SELLER POSITION: " .. tostring(Market:GetPos()))
    
    end
    	
    
    Reply With Quote Edit / Delete Windows 7 Faroe Islands Show Events

  7. Post #527
    Gold Member

    April 2009
    726 Posts
    -snip- I cant read..

    Are you sure the model is correct though?
    Reply With Quote Edit / Delete Windows 7 Denmark Show Events

  8. Post #528
    shrek yourself before you shrek yourself
    Duskling's Avatar
    March 2012
    875 Posts
    Can somebody let me know how I would go about sending a global tip ( the little pop up bubble to the left ) out to all people on the server?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  9. Post #529
    Fight for justice, fight for Manning and Snowden.
    Persious's Avatar
    April 2010
    2,597 Posts
    -snip- I cant read..

    Are you sure the model is correct though?
    LastStand.Config.SellerModel = "models/alyx.mdl" // Market NPC Model

    Wouldn't it return a error model if it was wrong?
    Reply With Quote Edit / Delete Windows 7 Faroe Islands Show Events

  10. Post #530
    Gold Member

    April 2009
    726 Posts
    LastStand.Config.SellerModel = "models/alyx.mdl" // Market NPC Model

    Wouldn't it return a error model if it was wrong?
    It's been ages since I've used Lua, but try setting the model BEFORE you spawn the NPC?
    Reply With Quote Edit / Delete Windows 7 Denmark Show Events Friendly Friendly x 1 (list)

  11. Post #531
    Fight for justice, fight for Manning and Snowden.
    Persious's Avatar
    April 2010
    2,597 Posts
    Okay, I'll try that.

    Edited:

    Haha! That worked. Thank you a lot.

    Edited:

    Eh, stumped on another problem.

    Why does
    				for k, v in pairs( LastStand.Config.ZombieEntities ) do
    					v:Remove()
    				end
    

    return Bad key to string index (number expected got string)
    Reply With Quote Edit / Delete Windows 7 Faroe Islands Show Events

  12. Post #532
    PROUD BRONY 4LYFE
    Drakehawke's Avatar
    February 2009
    3,312 Posts
    Okay, I'll try that.

    Edited:

    Haha! That worked. Thank you a lot.

    Edited:

    Eh, stumped on another problem.

    Why does
    				for k, v in pairs( LastStand.Config.ZombieEntities ) do
    					v:Remove()
    				end
    

    return Bad key to string index (number expected got string)
    Means v is a string.
    Reply With Quote Edit / Delete Windows Vista United Kingdom Show Events

  13. Post #533
    Fight for justice, fight for Manning and Snowden.
    Persious's Avatar
    April 2010
    2,597 Posts
    LastStand.Config.ZombieEntities = {
    	"ai_zombie_explode",
    	"ai_zombie_run",
    	"ai_zombie_stalker",
    	"ai_zombie_walk",
    	"ai_antlion",
    }
    
    Reply With Quote Edit / Delete Windows 7 Faroe Islands Show Events

  14. Post #534
    PROUD BRONY 4LYFE
    Drakehawke's Avatar
    February 2009
    3,312 Posts
    LastStand.Config.ZombieEntities = {
    	"ai_zombie_explode",
    	"ai_zombie_run",
    	"ai_zombie_stalker",
    	"ai_zombie_walk",
    	"ai_antlion",
    }
    
    You're calling :Remove() on a string..
    Reply With Quote Edit / Delete Windows Vista United Kingdom Show Events Agree Agree x 2 (list)

  15. Post #535
    Ask me about my ex-boyfriend being raided by the FBI
    Nerdeboy's Avatar
    August 2009
    1,862 Posts
    Did you mean to do this?

    for k, v in pairs( LastStand.Config.ZombieEntities ) do
    	for c, d in pairs( ents.FindByClass( v ) ) do
    		d:Remove()
    	end
    end
    
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  16. Post #536
    Fight for justice, fight for Manning and Snowden.
    Persious's Avatar
    April 2010
    2,597 Posts
    Fuck, my bad.
    Reply With Quote Edit / Delete Windows 7 Faroe Islands Show Events Friendly Friendly x 1Funny Funny x 1 (list)

  17. Post #537
    Arkadi's Avatar
    November 2011
    16 Posts
    Repost >_>

    local function ChangeHead(ent)
        if ent:IsPlayer() then
            local ply = ent
            function ply:BuildBonePositions()
                local bone = self:LookupBone("ValveBiped.Bip01_Head1")
                local vm = self:GetBoneMatrix(bone)
                     
                vm:Scale(Vector(0.01, 0.01, 0.01))
                     
                self:SetBoneMatrix(bone, vm)
            end
             
            local new = ClientsideModel("models/player/urban.mdl")
            new:SetParent(ply)
            new:AddEffects(EF_BONEMERGE | EF_NOSHADOW)
             
            function new:BuildBonePositions()
                for i = 0, self:GetBoneCount()-1 do
                    if self:GetBoneName(i) == "ValveBiped.Bip01_Head1" then
                        local vm = self:GetBoneMatrix(i)
                        vm:Scale(Vector(100, 100, 100)) -- 1/0.01
                        self:SetBoneMatrix(i, vm)
                    elseif self:GetBoneName(i) != "__INVALIDBONE__" then
                        local vm = self:GetBoneMatrix(i)
                        vm:Scale(Vector(0.01, 0.01, 0.01))
                        self:SetBoneMatrix(i, vm)
                    end
                end
            end
        end
    end
     
    hook.Add("OnEntityCreated", "ChangeHead", ChangeHead)

    ClientSideModel() is not showing
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  18. Post #538
    shrek yourself before you shrek yourself
    Duskling's Avatar
    March 2012
    875 Posts
    Can somebody let me know how I would go about sending a global tip ( the little pop up bubble to the left ) out to all people on the server?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  19. Post #539
    godlike's Avatar
    September 2010
    492 Posts
    snip
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  20. Post #540
    Gold Member
    ralle105's Avatar
    October 2005
    4,648 Posts
    Repost >_>

    local function ChangeHead(ent)
        if ent:IsPlayer() then
            local ply = ent
            function ply:BuildBonePositions()
                local bone = self:LookupBone("ValveBiped.Bip01_Head1")
                local vm = self:GetBoneMatrix(bone)
                     
                vm:Scale(Vector(0.01, 0.01, 0.01))
                     
                self:SetBoneMatrix(bone, vm)
            end
             
            local new = ClientsideModel("models/player/urban.mdl")
            new:SetParent(ply)
            new:AddEffects(EF_BONEMERGE | EF_NOSHADOW)
             
            function new:BuildBonePositions()
                for i = 0, self:GetBoneCount()-1 do
                    if self:GetBoneName(i) == "ValveBiped.Bip01_Head1" then
                        local vm = self:GetBoneMatrix(i)
                        vm:Scale(Vector(100, 100, 100)) -- 1/0.01
                        self:SetBoneMatrix(i, vm)
                    elseif self:GetBoneName(i) != "__INVALIDBONE__" then
                        local vm = self:GetBoneMatrix(i)
                        vm:Scale(Vector(0.01, 0.01, 0.01))
                        self:SetBoneMatrix(i, vm)
                    end
                end
            end
        end
    end
     
    hook.Add("OnEntityCreated", "ChangeHead", ChangeHead)

    ClientSideModel() is not showing
    ClientsideModels get garbage collected, do ply.whatever = new to prevent this.
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events

  21. Post #541
    shrek yourself before you shrek yourself
    Duskling's Avatar
    March 2012
    875 Posts
    Can somebody let me know how I would go about sending a global tip ( the little pop up bubble to the left ) out to all people on the server?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  22. Post #542

    January 2012
    6 Posts
    I've been making custom SWEPS (never coded anything before) and i cant seem to get the reload sounds working...
    Also when the recoil affects the gun, the bullets still shoot in the same place :(

    //General Settings \\
    SWEP.CSMuzzleFlashes = true
    SWEP.AdminSpawnable = true                          // Is the swep spawnable for admin 
    SWEP.ViewModelFOV = 64                              // How much of the weapon do u see ?
    SWEP.ViewModel = "models/weapons/v_rif_aa3.mdl"      // The viewModel, the model you se when you are holding it-.-
    SWEP.WorldModel = "models/weapons/w_rif_aa3.mdl"     // The worlmodel, The model yu when it's down on the ground
    SWEP.AutoSwitchTo = false                           // when someone walks over the swep, chould i automatectly change to your swep ?
    SWEP.Slot = 3                                       // Deside wich slot you want your swep do be in 1 2 3 4 5 6
    SWEP.HoldType = "smg"                            // How the swep is hold Pistol smg greanade melee
    SWEP.PrintName = "AUG A3"                         // your sweps name
    SWEP.Author = "Elitefroggy"                            // Your name
    SWEP.Spawnable = true                               //  Can everybody spawn this swep ? - If you want only admin keep this false and adminsapwnable true.
    SWEP.ViewModelFlip		= true
    SWEP.AutoSwitchFrom = false                         // Does the weapon get changed by other sweps if you pick them up ?
    SWEP.FiresUnderwater = false                        // Does your swep fire under water ?
    SWEP.Weight = 5                                     // Chose the weight of the Swep
    SWEP.DrawCrosshair = false                           // Do you want it to have a crosshair ?
    SWEP.Category = "Elitefroggy's SWEPS"                      // Make your own catogory for the swep
    SWEP.SlotPos = 3                                    // Deside wich slot you want your swep do be in 1 2 3 4 5 6
    SWEP.DrawAmmo = true                                // Does the ammo show up when you are using it ? True / False
    SWEP.ReloadSound = "none"       // Reload sound, you can use the default ones, or you can use your one; Example; "sound/myswepreload.waw"
    SWEP.Instructions = "Left click to fire, 'r' to reload."              // How do pepole use your swep ?
    SWEP.Contact = "xbox.corman@gmail.com"                     // How Pepole chould contact you if they find bugs, errors, etc
    SWEP.Purpose = "Kills Stuff"          // What is the purpose with this swep ?
    SWEP.base = "weapon_cs_base"
    //General settings\\
    
    //PrimaryFire Settings\\
    SWEP.Primary.BulletShot = true
    SWEP.Primary.Sound = "none"        // The sound that plays when you shoot :]
    SWEP.Primary.Damage = 32                           // How much damage the swep is doing
    SWEP.Primary.TakeAmmo = 1                          // How much ammo does it take for each shot ?
    SWEP.Primary.ClipSize = 32                         // The clipsize
    SWEP.Primary.Ammo = "smg1"                       // ammmo type pistol/ smg1 
    SWEP.Primary.DefaultClip = 64                      // How much ammo does the swep come with `?
    SWEP.Primary.Spread = 0                          //  Does the bullets spread all over, if you want it fire exactly where you are aiming leave it o.1
    SWEP.Primary.Cone = 0.15                            //cone is the acuracy, the less the cone the more acurate and more cone means big spread  
    SWEP.MoveSpread = 1.5                              //multiplier for spread when you are moving
    SWEP.JumpSpread = 5                         //multiplier for spread when you are jumping
    SWEP.CrouchSpread = 0.5                              //multiplier for spread when you are crouching
    SWEP.Primary.NumberofShots = 1                     // How many bullets you are firing each shot.
    SWEP.Primary.Automatic = true                     // Is the swep automatic ?
    SWEP.Primary.Recoil = 5                            //  How much we should punch the view
    SWEP.Primary.Delay = 0.1                           // How long time before you can fire again
    SWEP.Primary.Force = 10                            // The force of the shot
    SWEP.Primary.Recoil	= 1.5
    //PrimaryFire settings\\
    
    //Secondary Fire Variables\\
    SWEP.IronSightsPos = Vector (2.7843, -3.0914, 0.0344)
    SWEP.IronSightsAng = Vector (0, 0, 0)
    SWEP.Secondary.Sound = "none"        // The sound that plays when you shoot 
    SWEP.Secondary.Damage = 0                            // How much damage the swep is doing
    SWEP.Secondary.TakeAmmo = 0                          // How much ammo does it take for each shot ?
    SWEP.Secondary.ClipSize = -1                         // The clipsize
    SWEP.Secondary.Ammo = "none"                       // ammmo type pistol/ smg1 
    SWEP.Secondary.DefaultClip = -1                      // How much ammo does the swep come with `?
    SWEP.Secondary.Spread = 0                          //  Does the bullets spread all over, if you want it fire exactly where you are aiming leave it o.1
    SWEP.Secondary.NumberofShots = 0                     // How many bullets you are firing each shot.
    SWEP.Secondary.Automatic = false                     // Is the swep automatic ?
    SWEP.Secondary.Recoil = 0                            //  How much we should punch the view
    SWEP.Secondary.Delay = 0                           // How long time before you can fire again
    SWEP.Secondary.Force = 0                            // The force of the shot
    //Secondary Fire Variables\\
    
    local IRONSIGHT_TIME = 0.25
     
    /*---------------------------------------------------------
       Name: GetViewModelPosition
       Desc: Allows you to re-position the view model
    ---------------------------------------------------------*/
    function SWEP:GetViewModelPosition( pos, ang )
     
        if ( !self.IronSightsPos ) then return pos, ang end
     
        local bIron = self.Weapon:GetNetworkedBool( "Ironsights" )
         
        if ( bIron != self.bLastIron ) then
         
            self.bLastIron = bIron 
            self.fIronTime = CurTime()
             
            if ( bIron ) then
                self.SwayScale  = 0.3
                self.BobScale   = 0.1
    	        else
                self.SwayScale  = 1.0
                self.BobScale   = 1.0
            end
         
        end
         
        local fIronTime = self.fIronTime or 0
     
        if ( !bIron && fIronTime < CurTime() - IRONSIGHT_TIME ) then
            return pos, ang 
        end
         
        local Mul = 1.0
         
        if ( fIronTime > CurTime() - IRONSIGHT_TIME ) then
         
            Mul = math.Clamp( (CurTime() - fIronTime) / IRONSIGHT_TIME, 0, 1 )
             
            if (!bIron) then Mul = 1 - Mul end
         
        end
     
        local Offset    = self.IronSightsPos
         
        if ( self.IronSightsAng ) then
         
            ang = ang * 1
            ang:RotateAroundAxis( ang:Right(),      self.IronSightsAng.x * Mul )
            ang:RotateAroundAxis( ang:Up(),         self.IronSightsAng.y * Mul )
            ang:RotateAroundAxis( ang:Forward(),    self.IronSightsAng.z * Mul )
         
         
        end
         
        local Right     = ang:Right()
        local Up        = ang:Up()
        local Forward   = ang:Forward()
         
         
     
        pos = pos + Offset.x * Right * Mul
        pos = pos + Offset.y * Forward * Mul
        pos = pos + Offset.z * Up * Mul
     
        return pos, ang
         
    end
     
     
    /*---------------------------------------------------------
        SetIronsights
    ---------------------------------------------------------*/
    function SWEP:SetIronsights( b )
     
        self.Weapon:SetNetworkedBool( "Ironsights", b )
     
    end
     
     
    SWEP.NextSecondaryAttack = 0
    /*---------------------------------------------------------
        SecondaryAttack
    ---------------------------------------------------------*/
    function SWEP:SecondaryAttack()
     
        if ( !self.IronSightsPos ) then return end
        if ( self.NextSecondaryAttack > CurTime() ) then return end
         
        bIronsights = !self.Weapon:GetNetworkedBool( "Ironsights", false )
         
        self:SetIronsights( bIronsights )
         
        self.NextSecondaryAttack = CurTime() + 0.3
         
    end
     
    /*---------------------------------------------------------
        DrawHUD
         
        Just a rough mock up showing how to draw your own crosshair.
         
    ---------------------------------------------------------*/
    function SWEP:DrawHUD()
     
        // No crosshair when ironsights is on
        if ( self.Weapon:GetNetworkedBool( "Ironsights" ) ) then return end
     
        local x = ScrW() / 2.0
        local y = ScrH() / 2.0
        local scale = 10 * self.Primary.Cone
         
        // Scale the size of the crosshair according to how long ago we fired our weapon
        local LastShootTime = self.Weapon:GetNetworkedFloat( "LastShootTime", 0 )
        scale = scale * (2 - math.Clamp( (CurTime() - LastShootTime) * 5, 0.0, 1.0 ))
         
        surface.SetDrawColor( 0, 255, 0, 255 )
         
        // Draw an awesome crosshair
        local gap = 40 * scale
        local length = gap + 20 * scale
        surface.DrawLine( x - length, y, x - gap, y )
        surface.DrawLine( x + length, y, x + gap, y )
        surface.DrawLine( x, y - length, x, y - gap )
        surface.DrawLine( x, y + length, x, y + gap )
     
    end
     
    /*---------------------------------------------------------
        onRestore
        Loaded a saved game (or changelevel)
    ---------------------------------------------------------*/
    function SWEP:OnRestore()
     
        self.NextSecondaryAttack = 0
        self:SetIronsights( false )
         
    end
    
    
    function SWEP:Initialize()
        util.PrecacheSound(self.Primary.Sound);
        util.PrecacheSound(self.Secondary.Sound);
        if ( SERVER ) then
           self:SetWeaponHoldType( self.HoldType );
       end
    end
    
    function SWEP:PrimaryAttack()
       if ( !self:CanPrimaryAttack() ) then return end
    
    //Default stuff, normally used in any condition.
       self.Weapon:EmitSound ( "Weapons/aa3/aa3-1.wav" );
       self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay );
       self.Weapon:SetNextSecondaryFire( CurTime() + self.Primary.Delay );   
       self:TakePrimaryAmmo(self.Primary.TakeAmmo);
       self.Owner:ViewPunch( Angle( -2, 0.3, 0 ) );
    
    //The attack mode, can vary from the user settings
        if ( self.Primary.ModelShot ) then
        if (!SERVER) then return end;
        local ent = ents.Create ("prop_physics");
        ent:SetModel ( self.Primary.Model );
        if ( self.Primary.FireFromHip ) then
            ent:SetPos (self.Owner:EyePos() + (self.Owner:GetAimVector() * 32));
        else
            ent:SetPos (tr.HitPos + self.Owner:GetAimVector() * -16);
        end
        ent:SetAngles (self.Owner:EyeAngles());
        ent:Spawn();
        local phys = ent:GetPhysicsObject();
        local shot_length = tr.HitPos:Length();
        if ( self.Primary.Weld ) then
            local weld = constraint.Weld( tr.Entity, ent, tr.PhysicsBone, 0, 0 );
        end
        phys:ApplyForceCenter (self.Owner:GetAimVector():GetNormalized() * math.pow (shot_length, 3));
        cleanup.Add (self.Owner, "props", ent);
        undo.Create ("Thrown model");
        undo.AddEntity (ent);
        undo.SetPlayer (self.Owner);
        undo.Finish();
    end    if ( self.Primary.BulletShot ) then
            local bullet = {};
            bullet.Num = self.Primary.NumberofShots;
            --bullet.Src = self.Owner:GetShootPos();
            --bullet.Dir = self.Owner:GetAimVector();
            --bullet.Spread = Vector( self.Primary.Spread * 0.1 , self.Primary.Spread * 0.1, 0);
            bullet.Tracer = self.Primary.Tracer;
            bullet.Force = self.Primary.Force;
            bullet.Damage = self.Primary.Damage;
            bullet.AmmoType = self.Primary.Ammo;
    		if ( bIronsights ) then self:ShootBullet( 33, 1, 0.01 ) else self:ShootBullet( 33, 1, self.Primary.Cone ) end
            --self.Owner:FireBullets( bullet );
        end
    
    function SWEP:Reload()
       self.Weapon:EmitSound ( "Weapon_AA3.Reload" );
       self.Weapon:DefaultReload(ACT_VM_RELOAD);
       return true
    end
    
    function SWEP:Deploy()
       self.Weapon:SendWeaponAnim(ACT_VM_DRAW);
       return true
    end

    anyone know what is wrong? (i know my code is a mess...) :)
    Reply With Quote Edit / Delete Windows 7 Australia Show Events

  23. Post #543
    "The superior man understands what is right; the inferior man understands what will sell"
    Chessnut's Avatar
    August 2011
    3,555 Posts
    Can somebody let me know how I would go about sending a global tip ( the little pop up bubble to the left ) out to all people on the server?
    Usermessages and the draw/surface library.

    I'd store a variable clientside that is an empty string and have it draw with the HUDPaint hook.
    Then, I'd use a usermessage that sets the variable clientside and send it to all players.
    To make sure the people who joined after the message get it, I would store the tip serverside and send it to the new player on PlayerInitialSpawn.

    Hope that helps
    Reply With Quote Edit / Delete Mac United States Show Events

  24. Post #544
    HQRSE FUCKER
    ief014's Avatar
    September 2009
    3,069 Posts
    Is there a way to check if an Entity can take damage?

    Something similar to this
    Code:
    barrel:IsBreakable() -- false
    woodenCrate:IsBreakable() -- true
    Reply With Quote Edit / Delete Windows 7 Germany Show Events

  25. Post #545
    Gold Member
    ralle105's Avatar
    October 2005
    4,648 Posts
    local isBreakable = entity:Health() > 0
    
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Lua Helper Lua Helper x 1 (list)

  26. Post #546

    January 2012
    131 Posts
    Is the lua source of GM13 stored anywhere? I'd like to get the template DFrame off of which I could base my own frame. Thanks!
    Reply With Quote Edit / Delete Windows XP Estonia Show Events

  27. Post #547
    Facepunch's #1 Huskybutt
    James xX's Avatar
    July 2011
    2,095 Posts
    Is the lua source of GM13 stored anywhere?
    I hope this is irony.
    It's saved in the GCF file located in steamapps folder.
    Reply With Quote Edit / Delete Windows XP France Show Events

  28. Post #548

    January 2012
    131 Posts
    I hope this is irony.
    It's saved in the GCF file located in steamapps folder.
    It's ironic how you use the definition of irony.

    In all seriousness though, thanks.
    Reply With Quote Edit / Delete Windows XP Estonia Show Events

  29. Post #549
    Facepunch's #1 Huskybutt
    James xX's Avatar
    July 2011
    2,095 Posts
    It's ironic how you use the definition of irony.

    In all seriousness though, thanks.
    My definition of irony isn't ironic because the source code of a game has to be stored somewhere.
    and you're welcome. I think someone ( banana lord ) has a website ( glua.me ) containing the source code extracted from the GCF ( lua bin ) made by Overv.
    Reply With Quote Edit / Delete Windows XP France Show Events Agree Agree x 1 (list)

  30. Post #550
    HQRSE FUCKER
    ief014's Avatar
    September 2009
    3,069 Posts
    local isBreakable = entity:Health() > 0
    
    Why didn't I think of that...
    Thanks
    Reply With Quote Edit / Delete Windows 7 Germany Show Events

  31. Post #551
    Gold Banana
    Banana Lord.'s Avatar
    May 2010
    6,852 Posts
    and you're welcome. I think someone ( banana lord ) has a website ( glua.me ) containing the source code extracted from the GCF ( lua bin ) made by Overv.
    *see title to left/shameless advertising/yes it's me*
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 1 (list)

  32. Post #552
    My Blog
    Spencer Sharkey's Avatar
    July 2009
    1,958 Posts
    Setting model scale of models inside the DModelPanel in Gmod 13.
    Anyone?

    Edited:

    I got that part.. Now what about using the new ManipulateBoneScale on client entities in the DModelPanels? :S
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  33. Post #553
    Fixed's Avatar
    March 2010
    1,240 Posts
    ply:SetColor ain't working

    init:

    concommand.Add( "Ability2", function( ply )
    	if Points > 0 then
    		Points = Points - 1
    		if Race == 1 then
    			ply:SetColor( 255, 255, 255, 150 )
    		end
    	else
    		PrintMessage( HUD_PRINTTALK, "You are not able to do that!" )
    	end
    end )
    Reply With Quote Edit / Delete Windows 7 Denmark Show Events

  34. Post #554
    TheTrueAndy's Avatar
    September 2009
    451 Posts
    ply:SetColor ain't working

    init:

    concommand.Add( "Ability2", function( ply )
    	if Points > 0 then
    		Points = Points - 1
    		if Race == 1 then
    			ply:SetColor( 255, 255, 255, 150 )
    		end
    	else
    		PrintMessage( HUD_PRINTTALK, "You are not able to do that!" )
    	end
    end )
    ent:SetColor( Color( r, g , b , a ) )
    
    Reply With Quote Edit / Delete Windows XP Germany Show Events

  35. Post #555
    Cold Member
    Joshua Raphael's Avatar
    November 2011
    502 Posts
    ent:SetColor( Color( r, g , b , a ) )
    
    The wiki says you don't need to have the Color() in ent:SetColor()

    http://bananatree.im/wiki/wiki.garry...ticle.SetColor
    Reply With Quote Edit / Delete Windows 7 United States Show Events Dumb Dumb x 1Agree Agree x 1 (list)

  36. Post #556
    Fixed's Avatar
    March 2010
    1,240 Posts
    ent:SetColor( Color( r, g , b , a ) )
    
    Thanks, but how do I apply it on the player?
    Reply With Quote Edit / Delete Windows 7 Denmark Show Events

  37. Post #557
    Facepunch's #1 Huskybutt
    James xX's Avatar
    July 2011
    2,095 Posts
    The wiki says you don't need to have the Color() in ent:SetColor()

    http://bananatree.im/wiki/wiki.garry...ticle.SetColor
    Garry changed that in the update.
    Reply With Quote Edit / Delete Windows XP France Show Events

  38. Post #558
    Gold Member
    FoohyAB's Avatar
    July 2009
    945 Posts
    Is there an easy-ish way to make it so players can shoot weapons while in a vehicle? Not like the attached gun in the jeep, but their actual weapons they have when walking around.

    I'm sure this has been asked, but google search didn't immediately return anything useful.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  39. Post #559
    "The superior man understands what is right; the inferior man understands what will sell"
    Chessnut's Avatar
    August 2011
    3,555 Posts
    You can probably call player:FireBullets(tableOfBulletStuff).
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  40. Post #560
    Jvs
    PENISCorp's First Employee
    Jvs's Avatar
    June 2009
    1,613 Posts
    Is there an easy-ish way to make it so players can shoot weapons while in a vehicle? Not like the attached gun in the jeep, but their actual weapons they have when walking around.

    I'm sure this has been asked, but google search didn't immediately return anything useful.
    The hackiest way would be to parent the player to the seat manually so he isn't really in the vehicle for the engine and still can use his weapons, there's no other simple way to do it and make it compatible with c++ weapons.
    You can use capsadmin's seat addon which exactly does that.
    I don't think Caps released the last version though, so ask him directly for it.
    Reply With Quote Edit / Delete Windows XP Italy Show Events Useful Useful x 1 (list)