Player.ConCommand issue

I have a script using the Player.ConCommand function, but it isn’t behaving consistently.

I ran the script on a listen server and both Player.ConCommand and the console command itself worked just fine. However, I loaded it onto my server and Player.ConCommand stopped working properly (or, at least, as it had been working). Now the function no longer executes the console command. You can, however, execute the console command by typing it in. The script worked on the listen server, but now only manually typing in the console command runs the target function.

Does anyone know the issue?

Here’s the code:

[lua]if((string.lower(string.sub(text,1,5))=="/set “)&&(tonumber(string.sub(text,6,8))!=nil)
&&(string.sub(text,9,9)==”.")&&(tonumber(string.sub(text,10,10))!=nil)) then

		ply.bistar.freq = string.sub(text,6)
		ply:ChatPrint("(Frequency changed to: "..string.sub(text,6).. ")")

		ply:ConCommand("bistar_rp_updatefreq") // <-- THE ISSUE
		for k,v in pairs(player.GetAll()) do
			if (ply.bistar.freq) == v.bistar.freq then
				v:ChatPrint("RADIO["..tostring(ply.bistar.freq).."]: "..text)

As I said, the entire script ‘works,’ but it never really calls that command. I can type “bistar_rp_updatefreq” in and it works.

I replaced the issue line with game.ConsoleCommand("bistar_rp_updatefreq “…tostring(ply:UniqueID())…”
") and did a little work on the other end, and it seems to work just fine. Would be much easier to just pass the player object, as I originally tried.

you cant parse entities through console commands.

in gmod 13 the new net library can go from client to server AND server to client and allows you to parse entities.