Author Topic: Report to all admins!  (Read 8282 times)

I used Xalos' code. Not his.

This addon glitches out on my server. It always tells players they are sending too many reports. Any ideas?

Change if(getSimTime() - %cl.lastReport > $Pref::Server::ReportTimeoutMS) to if(vectorDist(%cl.lastReport, getSimTime()) > $Pref::Server::ReportTimeoutMS).

Change if(getSimTime() - %cl.lastReport > $Pref::Server::ReportTimeoutMS) to if(vectorDist(%cl.lastReport, getSimTime()) > $Pref::Server::ReportTimeoutMS).

No. Change the > to <.

No. Change the > to <.


==>echo(vectorDist(0, 30000) > 3000);
1
==>echo(vectorDist(0, 30000) < 3000);
0



==>echo(vectorDist(0, 30000) > 3000);
1
==>echo(vectorDist(0, 30000) < 3000);
0


not sure what you are trying to prove, but:

Code: [Select]
if(getSimTime() - %cl.lastReport > $Pref::Server::ReportTimeoutMS)
return messageClient(%cl, '', "\c3You are reporting too fast!");

You are saying if the time from last report is GREATER than your timeout, it will return the message, which isnt what you want (cant report after 3 seconds, not what you want). changing the > to < makes it so the if time from last report is LESS than timeout, it prevents the client from using it before 3 second timeout ends (Or whatever the host sets it to).

You should never use getSimTime(); because if the server is up for a really long time the number will get so big that glitches may start occurring. Use $Sim::Time instead. Take note though, $Sim::Time is in seconds, getSimTime(); is in milliseconds.

You should never use getSimTime(); because if the server is up for a really long time the number will get so big that glitches may start occurring. Use $Sim::Time instead. Take note though, $Sim::Time is in seconds, getSimTime(); is in milliseconds.
That explains why some mods of mine break after hosting for a while. Thank you.

You should never use getSimTime(); because if the server is up for a really long time the number will get so big that glitches may start occurring.


==>echo(vectorDist(123456789, 123453789));
3000


==>echo(vectorDist(123456789, 123453789));
3000
findClientByName("Xalos").player.setTransform("1500000 1500000 0");

That's related to getSimTime(); how, exactly?

That's related to getSimTime(); how, exactly?
It's not. It's just an example of Torque freaking out with numbers >= 1,000,000.
==>echo(vectorDist(123456789, 123453789));
3000
Not related to getSimTime(); either.

Not related to getSimTime(); either.

Uh yes it is. If you save the result of getsimtime to a variable (without doing any math wth it) you can then later use vectordist to find the difference to a newer getsimtime(), even if the numbers are way above 6 digits.

Why would you want to report when you are the administrator

Well for one, If a Super admin was abusing an Admin.

Or if a Super Admin was abusing and the only other person on was an Admin and SA