Thread: TPS Recorder
View Single Post
  #3  
Old 06-05-2006, 03:54 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Something like this:

PHP Code:
function onActionServerside() {
  if(
params[0] == "distcheck") {
    echo(
"Warning: Player \"" player.account "\" is moving at: " params[1] @ " Tiles/sec.  This is " server.max_tilespersecond params[1] @ " Tiles/sec faster than the defined maximum. (Speedhack?)");
  }
}

//#CLIENTSIDE
function onCreated() {
  
this.player_oldposition = { player.xplayer.}; 
  
setTimer(1);
}

function 
onTimeout() {
  
temp.dx this.player_oldposition[0] - player.x;
  
temp.dy this.player_oldposition[1] - player.y;
  
temp.distmoved = ((temp.dx^2)+(temp.dy^2))^0.05;

  if(
temp.distmoved server.max_tilespersecond) {
    
triggerserver("gui"this.name"distcheck"temp.distmoved);
  }

  
this.player_oldposition = { player.xplayer.};

  
setTimer(1);

?
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote