Local = ?

I have this code in sv.blala.lua:
[lua] local target = gm.player.get(arguments[1])

if (target) then
   -- code..
    gm.player.notify(player, arguments[1].." You failed!", 1);	   

And its working as its suppose to but i wanna use the “target” in another serverside file.
So i was wondering how should i do the “local target =” so it means the same as in sv.blala.lua?

GMPLAYERTARGET = gm.player.get(arg…

Oh… Thanks. But apparently that wasn’t my problem. im trying to send a usermessage.hook to
the player and the target ive tryed with a few things like just doing this:
[lua]function MenuB( player, command, arguments )

umsg.Start("gm_TestShare", player); umsg.End();
umsg.Start("gm_TestShare", GMPLAYERTARGET); umsg.End();

concommand.Add( “TestShareMenu”, TestShareMenu )[/lua]
But if i add two umsg.Start the menu doesn’t start but it does with one.

Show your usermessage.Hook function.

This is at the button of the clientside:
[lua]vgui.Register(“gm_TestShare”, PANEL, “DFrame”);

function gm.testshare.toggle(msg)
if (GAMEMODE.playerInitialized) then
gm.testshare.open = !gm.testshare.open;


	if (gm.testshare.panel) then
		gm.testshare.panel = vgui.Create("gm_TestShare");


usermessage.Hook(“gm_TestShare”, gm.testshare.toggle);[/lua]

You’re opening on the first message and turning it invisible on the 2nd… did you forget you intentionally made it a toggle message?:v:

Omg… can i fail more? :rolleyes: thanks for notice :D.

EDIT: I just though if you started the message for the player and target it would be the same menu but two different menus… hmm that didnt really make sence but yea nvm :P.