Hello, sorry for my bad english, i’m French
First, clientside hooks StartChat. After that, the function PlayerStartChat precache, prepare and transfer the name of the player (ply) to the server. After that, the server do that he would do.
Or, to fix that, if you know another way for the server get the name of the player who have oppened his chat… ^^
The error is on the line : util.AddNetworkString( “PlayerName” )
Can you help me please ? ^^
net.Receive( "PlayerName", function( len, client ) ply = "" local ply = net.ReadString() -- The serverside script part, we don't this part for my problem. end end ) local function PlayerStartChat(boolean) local ply = LocalPlayer() util.AddNetworkString( "PlayerName" ) net.Start( "PlayerName" ) net.WriteString( ply ) net.SendToServer() end hook.Add( "StartChat", "PlayerOpennedTheirChat", PlayerStartChat)