Until you learn, your going to be extremely limited in anything you can do in lua, or any programming language for that matter.
Table. Array. Matrix. 3 common terms across various languages.
Learn them Padawan.
I worded it incorrectly, let me try again. I understand tables, but I don't know library enough to actually use all features. There are just some things I don't feel the need to do use unless I really need them, and I'll typically get lucky and get them to work, others; well then we're in this type of situation that I was in.
Additionally, though I've not done any research what-so-ever, I question playernoclip actually being buggy, instead of just not being used correctly.
We use it in ULX with no issue we know of.
Code:(Whether or not the timer is there doesn't make a difference to the error, it will still error out, and not work)
This simple little piece of code should work, and it DOES, but only half way. This does give the message to the player saying they should not kill while in noclip, but then gives the error which will be located below. Now if you say I'm using it wrong still, obviously my basic understanding of hooks has changed.
[1] -- SERVER SIDE
[2]
[3]function DisableNoclipNoWeps2( ply )
[4] timer.Simple(0.5, function()
[5] if ply:GetMoveType() == 8 then
[6] umsg.Start("PlayerNoNoclipKill", ply)
[7] umsg.String("You are now in noclip do not kill people while in noclip!")
[8] umsg.End()
[9] end
[10] end)
[11]end
[12]hook.Add("PlayerNoClip", "DisableNoclipNoWeps2", DisableNoclipNoWeps2)
ERROR:[Dev Apple|191|STEAM_0:0:35379784] Lua Error:
[ERROR] addons/apple_noclip_noweapons/lua/autorun/sv_noclip_no.lua:6: attempt to index global 'umsg' (a nil value)
1. unknown - addons/apple_noclip_noweapons/lua/autorun/sv_noclip_no.lua:6