Global suspect

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
I'll have a look when I get home later on today or possibly tomorrow.
I don't see anything wrong with the code, Maybe play around with it or add some debugging code to find out if the timer is even called or something
 

Demo

Member
Member
Mar 3, 2016
108
14
18
28
Parts Unknown
I'll have a look when I get home later on today or possibly tomorrow.
I don't see anything wrong with the code, Maybe play around with it or add some debugging code to find out if the timer is even called or something
Maybe there's another way?The meaning of the plugin is that the admin writes /command "Nick" - this person ✔ effective use of coordinates - if they change the message to him - if not , nothing happens.Just disable validation.
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
Maybe there's another way?The meaning of the plugin is that the admin writes /command "Nick" - this person ✔ effective use of coordinates - if they change the message to him - if not , nothing happens.Just disable validation.
I guess add something in the timer like;
var OldPlayerLocation = Data[PlayerLocation]
var distance = Util.GetVectorsDistance(Player.location, OldPlayerLocation);
if distance > 2{
Ban?
else{
TimedEvent.Kill();
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Apologize me.

The timer is running on another thread so the error wasn't in my console.

It seems to work.

Code:
[3/18/2016 11:44:31] Timer ran, and the value is1: MagmaModule.MagmaTE
[3/18/2016 11:44:31] Timer ran, and the value is2: 7653232blabla
JavaScript:
function On_PluginInit() {
    var Data = Plugin.CreateDict();
    Data["PlayerID"] = "7653232blabla";
    Plugin.AdvancedTimers.CreateParallelTimer("SecUpdate", 1000, Data).Start();
}

function SecUpdateCallback(TimedEvent) {
    Plugin.Log("TestLog", "Timer ran, and the value is1: " + TimedEvent);
    TimedEvent.Kill();
    var data = TimedEvent.Args;
    var playerID = data["PlayerID"];
    Plugin.Log("TestLog", "Timer ran, and the value is2: " + playerID);
}
 

Demo

Member
Member
Mar 3, 2016
108
14
18
28
Parts Unknown
Apologize me.

The timer is running on another thread so the error wasn't in my console.

It seems to work.

Code:
[3/18/2016 11:44:31] Timer ran, and the value is1: MagmaModule.MagmaTE
[3/18/2016 11:44:31] Timer ran, and the value is2: 7653232blabla
JavaScript:
function On_PluginInit() {
    var Data = Plugin.CreateDict();
    Data["PlayerID"] = "7653232blabla";
    Plugin.AdvancedTimers.CreateParallelTimer("SecUpdate", 1000, Data).Start();
}

function SecUpdateCallback(TimedEvent) {
    Plugin.Log("TestLog", "Timer ran, and the value is1: " + TimedEvent);
    TimedEvent.Kill();
    var data = TimedEvent.Args;
    var playerID = data["PlayerID"];
    Plugin.Log("TestLog", "Timer ran, and the value is2: " + playerID);
}
Well - I check and write what happened
 

Demo

Member
Member
Mar 3, 2016
108
14
18
28
Parts Unknown
Apologize me.

The timer is running on another thread so the error wasn't in my console.

It seems to work.

Code:
[3/18/2016 11:44:31] Timer ran, and the value is1: MagmaModule.MagmaTE
[3/18/2016 11:44:31] Timer ran, and the value is2: 7653232blabla
JavaScript:
function On_PluginInit() {
    var Data = Plugin.CreateDict();
    Data["PlayerID"] = "7653232blabla";
    Plugin.AdvancedTimers.CreateParallelTimer("SecUpdate", 1000, Data).Start();
}

function SecUpdateCallback(TimedEvent) {
    Plugin.Log("TestLog", "Timer ran, and the value is1: " + TimedEvent);
    TimedEvent.Kill();
    var data = TimedEvent.Args;
    var playerID = data["PlayerID"];
    Plugin.Log("TestLog", "Timer ran, and the value is2: " + playerID);
}
Something not the code that I need....

I need a team ask a player to check - if move gets ban anti-cheat