Thread: function...
View Single Post
  #8  
Old 05-19-2007, 05:55 PM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
PHP Code:
// Custom Events System

//#CLIENTSIDE
// Set Default Flags
function onCreated()
{
  
this.pxy = {player.xplayer.y};
  
this.screen = {screenwidthscreenheight};
  
  
this.onTimeout();
}

function 
onTimeout()
{
  
// function onPlayerMoved(newx, newy) { }
  
if (player.!= this.pxy[0] || player.!= this.pxy[1])
  {
    
this.pxy = {player.xplayer.y};
    
    for (
temp.var : weaponstemp.var.trigger("PlayerMoved"player.xplayer.y);
  }

  
// function onScreenResize(newwidth, newheight) { }
  
if (screenwidth != this.screen[0] || screenheight != this.screen[1])
  {
    
this.screen = {screenwidthscreenheight};
    
    for (
temp.var : weaponstemp.var.trigger("ScreenResize"screenwidthscreenheight); // function onPlayerMoved(newx, newy) { }
  
}
  
  
setTimer(0.05);

Add it to every player. I could only think of two new events, but if others can think of more, you can easily add them.

Enjoy

P.S. Events only work in weapons.
__________________
- Zidane / Zidaya
Reply With Quote