Hey Guys,
Does dischat only apply to the client for one round? I used it on a player, but I'd have to run the command every round. Any ideas?
Hey Guys,
Does dischat only apply to the client for one round? I used it on a player, but I'd have to run the command every round. Any ideas?
Well, if the player doesn't ever change their name, and you are sure you want to go through with that, then you could do something like this:
make an event for when a player connects, in dmprecache or something...
local.result = registerev "connected" global/connectedhandler.scr
then in the connected .scr
Code:connected local.player: local.player.cl = getclientnum local.player local.player.name = netname local.player if(local.player.name == "that player's name") { stuffsrv ("dischat " + local.player.cl) } end
dischat is a built in function of Reborn. I have no idea how it works though, but it works. The only problem is that I'd like to disable a player's chat for the entire time they're in the server.... not just for one round of play. However, both are good, and as such, maybe there should be a command dischatperm and dischat
I don't know. Waiting for Razo's input on this.
Well, it should disable chat for whole time player is on the server. However, gamex86.dll is unloaded each map change (don't know about the round, it should not) and resets all the settings. (memory gets freed). Thats why I'll think about more persistent storage for client's settings.
You can use a simple mod, like armageddon wrote, re-enabling dischat in script. You would need to store player ID's in a CVar and re-enable dischat for them every new round.
This problem may be fixed in RC3 that I'm preparing.