The hook gets called with a player argument you can compare against: [url]https://github.com/Facepunch/garrysmod/blob/7afc0e9627781656216c5bdd85729b64c6d2174e/garrysmod/gamemodes/terrortown/gamemode/shared.lua#L178[/url]
[editline]5th November 2017[/editline]
Ninja'd
[QUOTE=txike;52859509][url]https://github.com/Facepunch/garrysmod/blob/7afc0e9627781656216c5bdd85729b64c6d2174e/garrysmod/gamemodes/terrortown/gamemode/shared.lua#L178[/url]
First argument is the player.[/QUOTE]
[code]
hook.Add("TTTPlayerSpeedModifier","tttknife", ply, function() return 2 end)
[/code]
So, that?
I haven't been able to get that to work, so my only conclusion is that I must be making a mistake somewhere. I have tried "ply" and "self.Owner" (this is in a SWEP file).
edit: to be clearer, I'm aware it's supposed to be self.Owner -- it's just not working with how I'm trying it.
It's a hook argument - it will be passed to the callback function. Ex.
[code]hook.Add("TTTPlayerSpeedModifier", "tttknife", function(pPlayer) if (pPlayer == blah) then return 2 end end)[/code]
[QUOTE=code_gs;52859638]It's a hook argument - it will be passed to the callback function. Ex.
[code]hook.Add("TTTPlayerSpeedModifier", "tttknife", function(pPlayer) if (pPlayer == blah) then return 2 end end)[/code][/QUOTE]
It works!
Thank you so much!
[QUOTE=residualgrub;52859241]For sure. This function is called in the INT of the entity on server side.
[code]function ENT:SpawnFlairDeployer()
for k ,v in pairs(self.FlairDeployers) do
local angs = self:GetAngles()
local angmath = Angle(v.ang,angs.y,(angs.z + v.rmod))
v.ent = ents.Create( "cas_flare_deploy" )
v.ent:SetPos( self:LocalToWorld(v.pos) )
v.ent:SetAngles(angmath)
v.ent:Spawn()
v.ent:SetNotSolid(false)
v.ent.p = self
constraint.NoCollide( self, v.ent, 0, 0 )
constraint.Weld(self, v.ent, 0,0,0, false)
v.ent.PhysgunDisabled = true
end
end[/code][/QUOTE]
So I have narrowed down my issue a bit. Its not actually the math causing it. When I weld the two entities together it changes the angles of the parent entity. Not finding any good way around this
[QUOTE=residualgrub;52859241]For sure. This function is called in the INT of the entity on server side.
[code]function ENT:SpawnFlairDeployer()
for k ,v in pairs(self.FlairDeployers) do
local angs = self:GetAngles()
local angmath = Angle(v.ang,angs.y,(angs.z + v.rmod))
v.ent = ents.Create( "cas_flare_deploy" )
v.ent:SetPos( self:LocalToWorld(v.pos) )
v.ent:SetAngles(angmath)
v.ent:Spawn()
v.ent:SetNotSolid(false)
v.ent.p = self
constraint.NoCollide( self, v.ent, 0, 0 )
constraint.Weld(self, v.ent, 0,0,0, false)
v.ent.PhysgunDisabled = true
end
end[/code][/QUOTE]
My guess is that your entity is in self.FlairDeployers so it calls SetaAngles on itself. Show the code where you populate self.FlairDeployers.
trying to set the pos manually, I tried testing this code with lua_openscript test.lua but it doesnt work?
[CODE]local function spawn_point( ply )
ply:SetPos( Vector(-4117,2879,703) )
end
hook.Add( "PlayerSpawn", "spawn_point", spawn_point )[/CODE]
I earlier replaced the second line with print(ply) and it printed the player perfectly in the console
I set the position of this npc and it spawns invisible and just has a shadow on the ground lmao, anyone know why?
I figured it might have been the playermodel but i changed it from models/police.mdl to models/player/police.mdl , still no luck
[IMG]https://i.imgur.com/bmu5BJI.jpg[/IMG]
- actual npc [url]https://github.com/SurelyExploding/noobonicplague/blob/master/entities/entities/npc_warden/shared.lua[/url]
- npc base [url]https://github.com/SurelyExploding/noobonicplague/blob/master/entities/entities/npc_noob_base/init.lua[/url]
Hi i am having a few issues with a custom TTT SWEP that combines a ww2 weapon with the flare gun to create incendiary ammo
the code is:
[CODE]//General Settings\\
SWEP.Category = "WWII TTT Weapons"
SWEP.Kind = WEAPON_HEAVY
SWEP.HoldType = "ar2"
SWEP.Base = "weapon_tttbase"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false
SWEP.Icon = "VGUI/ttt/weapon_dp_svt40"
//Serverside Settings\\
if ( SERVER ) then
AddCSLuaFile( "shared.lua" )
resource.AddFile("materials/VGUI/ttt/weapon_dp_svt40.vmt")
end
//Clientside Settings\\
if ( CLIENT ) then
SWEP.PrintName = "SVT-40 Fire Ammo"
SWEP.Author = "Syntax_Error752 and Adapted by Bakht"
SWEP.ViewModelFOV = 60
SWEP.Slot = 2
end
//Sounds and Models\\
SWEP.ViewModel = "models/weapons/v_garanb.mdl"
SWEP.WorldModel = "models/weapons/w_garanb.mdl"
local FireSound = Sound ("weapons/svt40_fire.wav");
local ReloadSound = Sound ("weapons/svt40_reload.wav");
SWEP.IronSightsPos = Vector (-6.95, -8, 5.1)
SWEP.ViewModelFlip = false
SWEP.Weight = 5
//Damage Statistics\\
SWEP.Primary.Recoil = 2.1
SWEP.Primary.Damage = 10
SWEP.Primary.NumShots = 1
SWEP.Primary.Cone = 0.02
SWEP.Primary.ClipSize = 10
SWEP.Primary.Delay = 0.5
SWEP.Primary.DefaultClip = 30
SWEP.Primary.Automatic = true
SWEP.Primary.Ammo = "smg1"
SWEP.Secondary.Automatic = true
SWEP.Secondary.Ammo = "none"
SWEP.AmmoEnt = "item_ammo_smg1_ttt"
//Functions\\
function SWEP:Reload()
if (self.Weapon:Clip1() < 10) then
if self.Owner:GetAmmoCount(self.Primary.Ammo) > 0 then
self.Weapon:EmitSound( ReloadSound )
end
self.Weapon:DefaultReload( ACT_VM_RELOAD );
self:SetIronsights( false )
end
end
local function RunIgniteTimer(ent, timer_name)
if IsValid(ent) and ent:IsOnFire() then
if ent:WaterLevel() > 0 then
ent:Extinguish()
else
-- keep on burning
return
end
end
timer.Remove(timer_name) -- stop running timer
end
local SendScorches
function IgniteTarget(att, path, dmginfo)
local ent = path.Entity
if not IsValid(ent) then return end
if SERVER then
local dur = ent:IsPlayer() and 5 or 10
-- disallow if prep or post round
if ent:IsPlayer() and (not GAMEMODE:AllowPVP()) then return end
ent:Ignite(dur, 100)
ent.ignite_info = {att=dmginfo:GetAttacker(), infl=dmginfo:GetInflictor()}
if ent:IsPlayer() then
timer.Simple(dur + 0.1, function()
if IsValid(ent) then
ent.ignite_info = nil
end
end)
local burn_time = 6
local tname = Format("ragburn_%d_%d", ent:EntIndex(), math.ceil(CurTime()))
timer.Create(tname,
0.1,
math.ceil(1 + burn_time / 0.1), -- upper limit, failsafe
function()
RunIgniteTimer(ent, tname)
end)
end
end
end
function SWEP:Shootfire()
local cone = self.Primary.Cone
local bullet = {}
bullet.Num = 1
bullet.Src = self.Owner:GetShootPos()
bullet.Dir = self.Owner:GetAimVector()
bullet.Spread = Vector( cone, cone, 0 )
bullet.Tracer = 1
bullet.Force = 5
bullet.Damage = self.Primary.Damage
bullet.TracerName = self.Tracer
bullet.Callback = IgniteTarget
self.Owner:FireBullets( bullet )
end
function SWEP:PrimaryAttack()
self:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
if not self:CanPrimaryAttack() then return end
self:EmitSound( FireSound )
self:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
self:Shootfire()
self:TakePrimaryAmmo( 1 )
if IsValid(self.Owner) then
self.Owner:SetAnimation( PLAYER_ATTACK1 )
self.Owner:ViewPunch( Angle( math.Rand(-0.2,-0.1) * self.Primary.Recoil, math.Rand(-0.1,0.1) *self.Primary.Recoil, 0 ) )
end
if ( (game.SinglePlayer() && SERVER) || CLIENT ) then
self:SetNWFloat( "LastShootTime", CurTime() )
end
end[/CODE]
The issue i am having is that usually the when ragdolls are shot they do not burn away and are not removed however after the server restarts they begin to burn and get removed until i resave the code in my server files.
The other thing i was struggling with was how i would make it so that ragdolls can't burn in the first place. Thanks
When a player dies and is still stuck looking at their corpse and player:Spawn() is called on them, why does their camera bounce up and down? I’m having this issue working with my gamemode.
[I]SNIP (Wrong problem)[/I]
How do you set the z axis of [URL="https://developer.valvesoftware.com/wiki/Env_fire"]env_fire[/URL] to the model you're parenting it too? It doesn't seem that setting a position matters at all.
I am curious if there is a alternative to [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/OnPlayerChangedTeam]GM:OnPlayerChangedTeam[/url]
Seems the hook isn't called, and I don't want to override the function via addon.
I've tried this with no luck:
[code]
function GAMEMODE:OnPlayerChangedTeam(ply, oldteam, newteam)
// code here //
self.BaseClass.OnPlayerChangedTeam(self, ply, oldteam, newteam)
end
[/code]
I tried to make own command.
After player death you can give him weapons that dropped after death.
I used code from one Facepunch thread:
[CODE]local canuse = {
["superadmin"] = true,
["admin"] = true
} --allows for certain usergroups to use this.
hook.Add("PlayerSay", "getweps_commnd", function(ply, text)
if (string.sub(text, 1, 8) == "!getweps") then
if (not canuse[ply:GetUserGroup()]) then return "" end --check to see if our rank can use this. add "user" if you want users to use it. or remove this line all together.
local pts = string.Explode(text, " ") --see if we searched for another player
local targ = ply --default to ourselves just in case.
if (pts[2]) then
for k, v in pairs(player.GetAll()) do
if (v == ply) then continue end --if the target equalss ourselves, we skip this entry
if (string.find(string.lower(v:Nick()), string.lower(pts[2]))) then
targ = v
break --we found our target, why should we keep running the loop?
end --try to find the search query in a players name, if so set the target to the them
end
end
local len = #targ.Weapons --length of the weapon table(amount of entries)
if (len == 0) then return "" end --no weapons
targ:StripWeapons() --remove all current weapons
for i = 1, len do
targ:Give(targ.Weapons[i]:GetClass()) --give the weapon after getting its class
end --loop through our table of weapons. remember, their weapons, so we have to grab their class to give it to the player.
ply.Weapons = {} --reset to prevent spawm
if (#targ.Ammo == 0) then return "" end --no ammo
for k, v in pairs(targ.Ammo) do
targ:GiveAmmo(k, v) --give the type with the amount
end --loop through all our ammo types
targ.Ammo = {} --reset to prevent spam
end
end)
hook.Add("PlayerDeath", "SAveWeapons", function(ply)
ply.Weapons = ply:GetWeapons() --get all the weapons
ply.Ammo = {} --create our table. and overwrite it, if it exists.
for i = 1, #ply.Weapons do
local wep = ply.Weapons[i] --index the weapon
local type = wep:GetPrimaryAmmoType() --index the type of the ammo
local count = ply:GetAmmoCount(type) --index the count of the ammo
ply.Ammo[type] = count -- set the ammo
end
end)[/CODE]
But i got error:
[CODE][ERROR] addons/gmodstorejob/lua/autorun/server/returnweps.lua:28: Tried to use a NULL entity!
1. GetClass - [C]:-1
2. v - addons/gmodstorejob/lua/autorun/server/returnweps.lua:28
3. unknown - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:138[/CODE]
You have to check if the weapon is valid before running GetClass on it. Ex.
[code]local pWeapon = targ.Weapons[i]
if (pWeapon:IsValid()) then
targ:Give(pWeapon:GetClass())
end[/code]
[QUOTE=code_gs;52865023]You have to check if the weapon is valid before running GetClass on it. Ex.
[code]local pWeapon = targ.Weapons[i]
if (pWeapon:IsValid()) then
targ:Give(pWeapon:GetClass())
end[/code][/QUOTE]
i added this but now when i use this command weapons just strips from me but it doesn't give it to me
[QUOTE=xpuska513;52865062]i added this but now when i use this command weapons just strips from me but it doesn't give it to me[/QUOTE]
It's probably because weapons are removed on death - saving them to a table won't stop their deletion. You should just store the class on death instead and give directly from that.
[QUOTE=code_gs;52865066]It's probably because weapons are removed on death - saving them to a table won't stop their deletion. You should just store the class on death instead and give directly from that.[/QUOTE]
Is this function right?
[CODE]
hook.Add("PlayerDeath", "Save weapons on death", function(ply)
ply.SavedWeapons = {}
for k,v in pairs(ply:GetWeapons()) do
ply.SavedWeapons[v:GetClass()] = true
end
end)
[/CODE]
[QUOTE=xpuska513;52865072]Is this function right?
[CODE]
hook.Add("PlayerDeath", "Save weapons on death", function(ply)
ply.SavedWeapons = {}
for k,v in pairs(ply:GetWeapons()) do
ply.SavedWeapons[v:GetClass()] = true
end
end)
[/CODE][/QUOTE]
You can just use a normal array instead, but that works with modification of your loop in the command.
[QUOTE=code_gs;52865090]You can just use a normal array instead, but that works with modification of your loop in the command.[/QUOTE]
I modified loop,but it doesn't seem to work.
[CODE]
local canuse = {
["superadmin"] = true,
["admin"] = true
} --allows for certain usergroups to use this.
hook.Add("PlayerSay", "getweps_commnd", function(ply, text)
if (string.sub(text, 1, 8) == "!getweps") then
if (not canuse[ply:GetUserGroup()]) then return "" end --check to see if our rank can use this. add "user" if you want users to use it. or remove this line all together.
local pts = string.Explode(text, " ") --see if we searched for another player
local targ = ply --default to ourselves just in case.
if (pts[2]) then
for k, v in pairs(player.GetAll()) do
if (v == ply) then continue end --if the target equalss ourselves, we skip this entry
if (string.find(string.lower(v:Nick()), string.lower(pts[2]))) then
targ = v
break --we found our target, why should we keep running the loop?
end --try to find the search query in a players name, if so set the target to the them
end
end
local len = #targ.SavedWeapons --length of the weapon table(amount of entries)
if (len == 0) then return "" end --no weapons
targ:StripWeapons() --remove all current weapons
for i = 1, len do
if (targ.SavedWeapons:IsValid()) then
targ:Give(targ.SavedWeapons[i]:GetClass())
end --give the weapon after getting its class
end --loop through our table of weapons. remember, their weapons, so we have to grab their class to give it to the player.
ply.SavedWeapons = {} --reset to prevent spawm
end
end)
hook.Add("PlayerDeath", "SAveWeapons", function(ply)
ply.SavedWeapons = {}
for k,v in pairs(ply:GetWeapons()) do
ply.SavedWeapons[v:GetClass()] = true
end
end)
[/CODE]
[editline]7th November 2017[/editline]
Also i tried to make the same thing but in ULX.
[CODE]
CATEGORY_NAME = "RDM Stuff"
if SERVER then -- Saving Ply's weapons upon death
hook.Add("PlayerDeath", "Save weapons on death", function(ply)
ply.SavedWeapons = {}
for k,v in pairs(ply:GetWeapons()) do
ply.SavedWeapons[v:GetClass()] = true
end
end)
end
function ulx.returnweps(calling_ply, target_ply)
local len = #target_ply.SavedWeapons
if (len == 0) then return "" end
target_ply.StripWeapons()
local pwep = target_ply.Weapons[i]
if (pwep:IsValid()) then
pwep:Give(pwep:GetClass())
end
end
local returnweps = ulx.command( CATEGORY_NAME, "ulx returnweps", ulx.returnweps, "!returnweps" )
returnweps:addParam{ type=ULib.cmds.PlayerArg }
returnweps:defaultAccess( ULib.ACCESS_SUPERADMIN )
returnweps:help( "Return player weapons when he dies." )
[/CODE]
You didn't modify the loop inside your PlayerSay. Try this:
[code]-- Command to use. Supports patterns
local sCommand = "!getweps"
if (SERVER) then
-- Allow for certain usergroups to use this
local tUserGroups = {
superadmin = true,
admin = true
}
-------------------------------------------------
util.AddNetworkString("getweps_failed_rank")
util.AddNetworkString("getweps_failed_noname")
util.AddNetworkString("getweps_failed_twonames")
util.AddNetworkString("getweps_failed_weps")
util.AddNetworkString("getweps_success")
local function GiveWeps(pPlayer)
local tWeapons = pPlayer.m_tSavedWeapons
if (tWeapons == nil) then
return false
end
pPlayer.m_tSavedWeapons = nil
for i = 1, tWeapons[0] do
pPlayer:Give(tWeapons[i])
end
return true
end
hook.Add("PlayerSay", "getweps", function(pPlayer, sText)
local sName = string.match(sText, "^" .. sCommand .. "%s*(.-)%s*$")
if (sName ~= nil) then
-- This line checks rank for usage. Comment it out to allow all to use
if (tUserGroups[pPlayer:GetUserGroup()]) then
net.Start("getweps_failed_rank")
net.Send(pPlayer)
elseif (sName == "") then
net.Start(GiveWeps(pPlayer) and "getweps_success" or "getweps_failed_weps")
net.WriteEntity(pPlayer)
net.Send(pPlayer)
else
local sNameCompare = string.lower(sName)
local tPlayers = player.GetAll()
local pTarget
for i = 1, #tPlayers do
local pPlayer = tPlayers[i]
if (string.find(pPlayer:Nick(), sNameCompare, 1, true)) then
if (pTarget ~= nil) then
net.Start("getweps_failed_twonames")
net.WriteString(sName)
net.Send(pPlayer)
return ""
end
pTarget = pPlayer
end
end
if (pTarget == nil) then
net.Start("getweps_failed_noname")
net.WriteString(sName)
else
net.Start(GiveWeps(pTarget) and "getweps_success" or "getweps_failed_weps")
net.WriteEntity(pTarget)
end
net.Send(pPlayer)
end
return ""
end
end)
hook.Add("DoPlayerDeath", "getweps", function(pPlayer)
local tWeapons = pPlayer:GetWeapons()
local tClasses = {}
local iLen = 0
for k, v in pairs(tWeapons) do
iLen = iLen + 1
tClasses[iLen] = tWeapons[k]:GetClass()
end
tClasses[0] = iLen
pPlayer.m_tSavedWeapons = tClasses
end)
else
net.Receive("getweps_failed_rank", function()
chat.AddText("Rank not allowed to use " .. sCommand)
end)
local function CommandResponse(sNetMessage, sMessageLeft, sMessageRight, bReadString)
local func = bReadString and net.ReadString or net.ReadEntity
net.Receive(sNetMessage, bReadString and function()
chat.AddText(sMessageLeft .. net.ReadString() .. sMessageRight)
end or function()
local pPlayer = net.ReadEntity()
if (pPlayer:IsPlayer()) then
chat.AddText(sMessageLeft .. pPlayer:Nick() .. sMessageRight)
end
end)
end
CommandResponse("getweps_failed_noname", "Could not find player by name \"", "\"", true)
CommandResponse("getweps_failed_twonames", "Two or more players found by name \"", "\"", true)
CommandResponse("getweps_failed_weps", "Player \"", "\" does not have previous weapons (command used already or hasn't died yet)", false)
CommandResponse("getweps_success", "Weapons given to player \"", "\"", false)
end[/code]
Is there a wrapper/utility for taking care of large net messages automatically? I recall seeing one I think a while back but can't find it anymore, is it even good or would I be better off implementing my own net message splitting every time?
I'm trying to put this together so that when a player dies, it chooses a random sound file to play out of the 4 listed, but it's not working.
[CODE]local deathlist = {
"dead1.wav",
"dead2.wav",
"dead3.wav",
"dead4.wav"
}
hook.Add("PlayerDeathSound", "DeFlatline", function() return true end)
local noise = table.random( deathlist )
hook.Add("PlayerDeath", "NewSound", function(vic,unused1,unused2) vic:EmitSound(noise) end)[/CODE]
Apologies if this is a dumb question, I'm new to lua.
[QUOTE=Codingale;52869530]Is there a wrapper/utility for taking care of large net messages automatically? I recall seeing one I think a while back but can't find it anymore, is it even good or would I be better off implementing my own net message splitting every time?[/QUOTE]
You're probably thinking of GLON or pON, but I would recommend just making your own net messages.
[QUOTE=Codingale;52869530]Is there a wrapper/utility for taking care of large net messages automatically? I recall seeing one I think a while back but can't find it anymore, is it even good or would I be better off implementing my own net message splitting every time?[/QUOTE]
Why exactly do you need to send so much data? More often than not you don’t need to be sending so much.
[QUOTE=code_gs;52870713]You're probably thinking of GLON or pON, but I would recommend just making your own net messages.[/QUOTE]
Do either of those send the net messages? I'm confused on how they work, there's not really documentation or examples from what I saw.
[editline]8th November 2017[/editline]
[QUOTE=YourStalker;52871303]Why exactly do you need to send so much data? More often than not you don’t need to be sending so much.[/QUOTE]
It's for a competition to generate a screen shot and save it. It has to use render.Capture and the image is just slightly over the max net message size.
I tried to compress it with util.Compress and util.Decompress but the data gets corrupted.
Send it in parts (use a timer and spread out the size).
How do I index Entity:GetRenderBounds(), do I also define it? and would i go about doing that
[ERROR] addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_modelpanelplus.lua:131: attempt to index field 'Entity' (a nil value)
1. CalculateModelView - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_modelpanelplus.lua:131
2. LoadModel - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_modelpanelplus.lua:85
3. GenerateEntityAndMiscTab - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_customf4menu.lua:586
4. unknown - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_customf4menu.lua:68
[CODE] function PANEL:CalculateModelView( x, y, z, div )
local xMult, yMult, zMult = x or 0.75, y or 0.75, z or 0.5
local boundsDiv = div or 2
local renderMins, renderMaxs = self.dModelPanel.Entity:GetRenderBounds( )
self.dModelPanel:SetCamPos( renderMins:Distance( renderMaxs ) * Vector( xMult, yMult, zMult ) )
self.dModelPanel:SetLookAt( ( renderMaxs + renderMins ) / boundsDiv )
end
[/CODE]
[QUOTE=lubatron;52872306][ERROR] addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_modelpanelplus.lua:131: attempt to index field 'Entity' (a nil value)[/QUOTE]
That error isn't to do with the way you're indexing GetRenderBounds. That error is because dModelPanel.Entity is nil. Maybe try [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/DModelPanel/GetModel]DModelPanel:GetModel[/url]?
[QUOTE=MPan1;52872315]That error isn't to do with the way you're indexing GetRenderBounds. That error is because dModelPanel.Entity is nil. Maybe try [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/DModelPanel/GetModel]DModelPanel:GetModel[/url]?[/QUOTE]
[ERROR] addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_modelpanelplus.lua:131: attempt to index field 'GetModel' (a function value)
1. CalculateModelView - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_modelpanelplus.lua:131
2. LoadModel - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_modelpanelplus.lua:85
3. GenerateJobsTab - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_customf4menu.lua:636
4. Init - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_customf4menu.lua:30
5. Create - lua/includes/extensions/client/panel/scriptedpanels.lua:37
6. Call - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_customf4menu.lua:802
7. unknown - addons/darkrpmodification-master/lua/darkrp_modules/base/cl_gamemode_functions.lua:46
[QUOTE=lubatron;52872328][ERROR] addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_modelpanelplus.lua:131: attempt to index field 'GetModel' (a function value)
1. CalculateModelView - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_modelpanelplus.lua:131
2. LoadModel - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_modelpanelplus.lua:85
3. GenerateJobsTab - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_customf4menu.lua:636
4. Init - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_customf4menu.lua:30
5. Create - lua/includes/extensions/client/panel/scriptedpanels.lua:37
6. Call - addons/darkrpmodification-master/lua/darkrp_modules/noobvgui/cl_customf4menu.lua:802
7. unknown - addons/darkrpmodification-master/lua/darkrp_modules/base/cl_gamemode_functions.lua:46[/QUOTE]
* With brackets at the end because it's a function
[CODE]
dModelPanel:GetModel():GetRenderBounds()
[/CODE]
Sorry, you need to Log In to post a reply to this thread.