View Single Post
  #1  
Old 11-24-2011, 08:07 PM
Ohk4y Ohk4y is offline
Registered User
Ohk4y's Avatar
Join Date: Jun 2011
Posts: 43
Ohk4y is an unknown quantity at this point
Send a message via AIM to Ohk4y
Mining System Timeout

Hello! I'm trying to make a mining system and I ran into an issue. I want it to put all the rocks back to normal (from being destroyed - to how they were before the player 'hurt' them) if there are no players around the rocks.

This is what I have so far for that part of the script. keep in mind I am just testing the X and Y of the player so I can go from there.

PHP Code:
function onTimeOut() {
  for (
pl allplayers) {
    if (
pl.1.5 in |this.xthis.2|) {
      
onTrueX();
    }else 
onFalse();
    if (
pl.1.5 in |this.ythis.2|) {
      
onTrueY();
    }else 
onFalse();    
  }
 
setTimer(.05);
}

function 
onTrueX() this.chat "true X";
function 
onTrueY() this.chat "true Y";
function 
onFalse() {
  
this.chat "  ";

NOTE: This is within a class, serverside.
__________________
Reply With Quote