| pig132 |
10-12-2011 06:33 AM |
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.x + 3 + (screenwidth / 32), player.y + 3 + (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(10000, 1000000)) @ ".png"; temp.center = {player.x + 3 + (screenwidth / 32), player.y + 3 + (screenheight / 32)}; ShowFlash(); makescreenshot2(temp.filename, 0x3f, temp.center[0], temp.center[1], player.z, screenwidth, screenheight); }
function ShowFlash() { with (findimg(200)) { polygon = { 0, 0, 64, 0, 64, 64, 0, 64 }; for (temp.i = 1; temp.i >= 0; temp.i -= 0.1;) { alpha -= 0.1; sleep(0.05); if (temp.i == 0) { hideimg(200); } } } }
Thank you ^^
|