• Lightsaber net.Receive ReadInt
    2 replies, posted
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: [CODE] button.DoClick = function() self.ForceMenu:Remove() self.ForceMenu = nil net.Start( SelectForce" ) net.WriteInt( key, 32 ) net.SendToServer() gui.EnableScreenClicker( false ) end[/CODE] My Receive Server code must be: [CODE] 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)[/CODE] 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.
Sorry, you need to Log In to post a reply to this thread.