Thread: Zooming
View Single Post
  #16  
Old 11-14-2011, 06:22 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by Astram View Post
PHP Code:
/*
Script for Emera by Astram
Note: Same formula can apply for stealth using player.alpha
Saying /big will toggle the zoom for everyone, and when someone logs on the server
they will be updated to see big people
*/

function onActionServerSide() {
  
this.canuse = {"Manager", "Owner", "Co-Owner"};
  if (
params[0] == "ZoomCheck") {
    for (
temp.p : allplayers) {
      if (
p.zoom == 2) {
        
triggerclient( "gui", this.name, "Zoom", 2, p);
      }
    }
  }
  if (
params[0] == "Zoom" && player.guild in this.canuse) {
    if (
params[1] == "Big") {
      for (
temp.p : allplayers) {
        
p.triggerclient( "gui", this.name, "Zoom", 2, player);
      }
    }
    if (
params[1] == "Normal") {
      for (
temp.p : allplayers) {
        
p.triggerclient( "gui", this.name, "Zoom", 1, player);
      }
    }
  }
}

//#CLIENTSIDE
function onCreated() {
  
triggerserver( "gui", this.name, "ZoomCheck");
}

function 
onPlayerChats() {
  if (
player.chat == "/big") {
    if (
player.zoom != 2) {
      
triggerserver( "gui", this.name, "Zoom", "Big");
    } else {
      
triggerserver( "gui", this.name, "Zoom", "Normal");
    }
  }
}

function 
onActionClientSide() {
  if (
params[0] == "Zoom") {
    
findplayer(params[2]).zoom = params[1];
  }
} 
Wanting to zoom everything (like in the picture)
__________________
Reply With Quote