Lightsaber net.Receive ReadInt

Hey guys,

I’m dev on a swrp Server and have to make some changes to a code.
My DermaPanels Opens the ForceSelection and if u press on A Button it must net.Start

I need the Server Function to change the force to the key pressed.

the derma panel do this:


		button.DoClick = function()
			self.ForceMenu:Remove()
			self.ForceMenu = nil
			net.Start( SelectForce" )
			net.WriteInt( key, 32 )
			net.SendToServer()
			gui.EnableScreenClicker( false )
		end

My Receive Server code must be:


	util.AddNetworkString( "SelectForce" )

	net.Receive ("SelectForce", function ( len, ply)
	
	local force = net.ReadInt()
		if not IsValid( ply:GetActiveWeapon() ) then return end
	if not ply:GetActiveWeapon() then return end
	if not ply:GetActiveWeapon().IsLightsaber then return end
	
	
	RunConsoleCommand( "rb655_select_force", force )
	end)

But he cannot read the integer. does someone have a short fix for this? that he can read the integer of the force im pressed?

Thanks alot.
It would be helpful if someone post the function to read the integer from the derm panel that i use the right variable.

net.ReadInt(32)

Thank u i was so dumb…
Now it works.