So what im doing is UserMessage from sv to cl
so this is the code in SV
[CODE]function GAMEMODE:ShowTeam( ply )
--ply:ConCommand( "openinv" )
umsg.Start( "NETOpenReport", ply ) -- Sending a message to the client.
umsg.End()
end[/CODE]
i get
[CODE][ERROR] addons/admin-report/lua/autorun/sv_adminreport.lua:1: attempt to index global 'GAMEMODE' (a nil value)
1. unknown - addons/admin-report/lua/autorun/sv_adminreport.lua:1
[/CODE]
yes the whole system works cause i created an concommand for it!
[QUOTE=WilliamAtSky;47716098]So what im doing is UserMessage from sv to cl
so this is the code in SV
[CODE]function GAMEMODE:ShowTeam( ply )
--ply:ConCommand( "openinv" )
umsg.Start( "NETOpenReport", ply ) -- Sending a message to the client.
umsg.End()
end[/CODE]
i get
[CODE][ERROR] addons/admin-report/lua/autorun/sv_adminreport.lua:1: attempt to index global 'GAMEMODE' (a nil value)
1. unknown - addons/admin-report/lua/autorun/sv_adminreport.lua:1
[/CODE]
yes the whole system works cause i created an concommand for it![/QUOTE]
change "GAMEMODE" to "GM"
You could use hook.Add("ShowTeam","HookName",YourFunction) because your code is for an addon and not a gamemode.
kk ill try DevShinx, btw polivlas that gives me nil too already tried
[editline]13th May 2015[/editline]
Thanks DevShinx Worked good :D
Sorry, you need to Log In to post a reply to this thread.