Text print functions not working properly

This may not be the best suited forum for this issue but I felt it would be better here. Basically, no text print related functions come up in the in-game player’s console. Instead, they only display in the main server console. When I say text print related functions, I mean print( … ), PrintTable( … ), MsgC( … ), MsgN( … ) and a few others. Does anyone know why this may be happening? I’m running a sandbox derived custom gamemode on a local network based dedicated server. Any help would be much appreciated, thanks in advance.

print statements run in the realm they were called in.

Example: If you have a shared file with a print statement inside of a function; if the function is called on SERVER then only the server will print it out whereas if the function was called on the CLIENT then the client would see it.

There are hooks and functions which are called simultaneously and in those cases it would print for both the client and the server.

Uhh I see. I was testing them in a server file (“sv_commands.lua”) so I think that might be why. Gosh, I feel so dumb because I didn’t even know that. Maybe it would be a better idea to have the commands in a shared file instead. I’ll give it a go tomorrow, can’t tonight though. Thank you!

Also, for some reason some of these functions print twice. An example would be a simple MsgC in OnReloaded which says the gamemode has been reloaded. Another example is in a cycle fire mode function in my weapon base. I can’t seem to figure out why it’s displaying the text twice. I haven’t really tried to isolate the problem yet either which I should do but I thought I might ask anyways in case anyone knew why it’s happening.

SWEP function calls are spammed client-side; use IsFirstTimePredicted( ) to ensure it only runs once.

I thought I tried that already, I guess not. Thanks for the help.