Dont know how to word this but how would i set a string to the sender
What is meant to happen:
The player selects a weapon from the menu, this is then saved to the player and then when PlayerSpawn hook is called it will give the player the guns that he selected from the menu.
-- Server Side if ( SERVER ) then util.AddNetworkString( "PGun" ) net.Receive( "PGun", function( len, ply ) local PGun = net.ReadString() -- Set the players gun here but do NOT give it now. end ) end if ( CLIENT ) then -- Have derma buttons etc to send the data to the server net.Start( "PGun" ) net.WriteString( gun selected from the client side goes here , i will just use local variable here. ) net.SendToServer() end
So my question is:
How would i make it so the the server knows what gun the player selected?
Should be able to do the rest my self