View Single Post
  #7  
Old 06-04-2012, 10:22 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by /scripthelp
makescreenshot2(str, int, float, float, float, int, int) - makes a screenshot without gui, parameters are filename, render bit flags (1 (local player) + 2 (other players) + 4 (npcs) + 8 (particles from removed objects) + 0x10 (weapon showimgs) + 0x20 (daynight effect), or 0x3f for everything), levelx, levely, levelz, pixelwidth and pixelheight
This makes it work as intended:

PHP Code:
//#CLIENTSIDE

function onMouseDown() {
  
this.opx = int(mousex); 
  
this.opy = int(mousey);
} 

function 
GraalControl.onMouseDragged() { 
  
this.npx = int(mousex); 
  
this.npy = int(mousey); 
  
with (findimg(200)) { 
    
polygon = { 
      
thiso.opx, thiso.opy, 
      
thiso.npx, thiso.opy, 
      
thiso.npx, thiso.npy, 
      
thiso.opx, thiso.npy 
    
}; 
    
alpha = 0.45; 
  } 
  
with (findimg(201)) { 
    
text = thiso.opx SPC "|" SPC thiso.opy; 
    
layer = 5; 
    
x = screenwidth / 2; 
    
y = 10; 
    
style = "c"; 
  } 
  
with (findimg(202)) { 
    
text = thiso.npx SPC "|" SPC thiso.npy; 
    
layer = 5; 
    
x = screenwidth / 2; 
    
y = 30; 
    
style = "c"; 
  } 
} 

function 
onMouseUp() { 
  
hideimgs(200, 202); 
  
generateImage(); 
} 

function 
generateImage() {
  
// Determine Pixel Width and Height
  
temp.iw = (this.npx - this.opx) * 16; 
  
temp.ih = (this.npy - this.opy) * 16;
  
// Take Screenshot
  
makescreenshot2(extractfilebase(player.level.name) @ "_" @random(0, 999999999) @ ".png", 0x3f, this.opx, this.opy, player.z, temp.iw, temp.ih);
  
// Clean up variables
  
this.npx = this.npy = this.opx = this.opy = "";
} 
__________________
Quote:
Reply With Quote