AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Messages don't print in the console (https://forums.alliedmods.net/showthread.php?t=172849)

stream 11-26-2011 15:39

Messages don't print in the console
 
Hello!
Why are messages write by the plugin aren't printed in the console?
Code:

#include <amxmodx>
#define PLUGIN "Wymuszanie ustawien sieciowych"
#define VERSION "1.0"
#define AUTHOR "stream"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_authorized(id)
{
client_cmd(id, "rate 25000")
client_cmd(id, "cl_updaterate 101")
client_cmd(id, "cl_cmdrate 101")
client_cmd(id, "cl_cmdbackup 2")

client_print(id, print_console, "----------------------------------------------------------------------------------")
client_print(id, print_console, "Zmieniono wartosci: rate 25000, cl_updaterate 101, cl_cmdrate 101, cl_cmdbackup 2!")
client_print(id, print_console, "----------------------------------------------------------------------------------")
}

Sorry for my very bad English language :grrr:

edit:
Code:

client_cmd(id, "echo ----------------------------------------------------------------------------------")
client_cmd(id, "echo Zmieniono wartosci: rate 25000, cl_updaterate 101, cl_cmdrate 101, cl_cmdbackup 2!")
client_cmd(id, "echo ----------------------------------------------------------------------------------")

It's works, but why the first version doesn't work?

fysiks 11-26-2011 16:31

Re: Messages don't print in the console
 
Changing client settings is not allowed here. Also, you don't need to set rates for players as you can do that in server.cfg with sv_minupdaterate/sv_maxupdaterate and sv_minrate/sv_maxrate.

stream 11-26-2011 17:08

Re: Messages don't print in the console
 
A lot of servers, practicing force rate and I want to know why the first version doesn't print messages in console.

bibu 11-26-2011 17:18

Re: Messages don't print in the console
 
If you have a Slowhack-Code in your plugin, it won't work.

Simple.

jim_yang 11-26-2011 17:32

Re: Messages don't print in the console
 
client_print only works after clients are putinserver
client_authorized is in client_connect

stream 11-27-2011 17:50

Re: Messages don't print in the console
 
Guys, how to control the rate players using client_infochanged? Player changes the rate to 20000 (25000 is enforced), client_infochanged detects this and changes to 25000 again.

Please give an example.

Thanks and sorry for my very bad English language :grrr:.

Hunter-Digital 11-28-2011 00:54

Re: Messages don't print in the console
 
You shouldn't and you don't need to, just use server cvars:
sv_maxrate
sv_minrate
mp_maxupdaterate
mp_minupdaterate

ConnorMcLeod 11-28-2011 01:20

Re: Messages don't print in the console
 
jim_yang gave your answer about print problem.

Your other problem is about slowhacking problem and it is not allowed there, locked.


All times are GMT -4. The time now is 08:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.