View Single Post
  #1  
Old 10-12-2011, 06:33 AM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
Getting center of level (makescreenshot)

Alright i've run into a little problem making my own screenshot weapon.

Everything works fine except when trying to get the center of the level. I've tried fowlplay4's line of:
PHP Code:
temp.center = {player.+ (screenwidth 32), player.+ (screenheight 32)}; 
And i've also tried things like:
PHP Code:
temp.center = {(screenwidth 2), (screenheight 2)} 
And also 30, 30 for the center but no matter what i set it to, it always outputs the same image.

Why is this?

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  
temp.filename "screenshot_" int(random(100001000000)) @ ".png";
  
temp.center = {player.+ (screenwidth 32), player.+ (screenheight 32)};
  
ShowFlash();
  
makescreenshot2(temp.filename0x3ftemp.center[0], temp.center[1], player.zscreenwidthscreenheight);
}

function 
ShowFlash() {
  
with (findimg(200)) {
    
polygon = {
      
00640,
      
6464064
    
};
    
    for (
temp.1temp.>= 0temp.-= 0.1;) {
      
alpha -= 0.1;
      
sleep(0.05);
      
      if (
temp.== 0) {
        
hideimg(200);
      }
    }
  }

Thank you
Reply With Quote