Jump to content

jyrno42

Members
  • Posts

    16
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

jyrno42's Achievements

Square

Square (6/54)

0

Reputation

  1. The smaller example of the possibilities can be seen in the following video: It basically allows scripters to create modules which update the textures of objects in their server. The video showed an early version of my module which only had a couple of functions. Now, on to the GD part. http://www.libgd.org/Main_Page The GD adds more on-the-fly possibilities to the texture updating part. For example i could make this:
  2. Texturizer Version: 0.91 Texturizer is a module which provides TXD libary writing and GD functions to MTASA server. It's available Windows only, however since the build system is CMake it should be pretty simple to use it on another platforms. I also added a small resource to clean up after lazy scripters. The resource also provides a testing base for future updates. Download: WIN32 Dll, vs2008 Installation: See wikipedia (https://wiki.multitheftauto.com/wiki/Modules/Texturizer). Functions: bool/int createTxdContainer( void ); bool txdContainerAddImage( int container, string name, string filePath[, bool compress, string alphaname] ); bool saveTxdContainer( int container, string fName ); table gd_info( ); bool/userdata imageCreate( int w, int h ); bool/userdata imageCreateTrueColor( int w, int h ); bool/userdata imageCreateFromPng( string File ); bool/userdata imageCreateFromGif( string File ); bool/userdata imageCreateFromJpeg( string File ); bool/int imageSX( userdata im ); bool/int imageSY( userdata im ); bool imageIsTrueColor( userdata im ); bool imagePng( userdata im, string fPath[, int level = 0, int delete = false] ); bool imageGif( userdata im, string fPath[, bool delete = false] ); bool imageJpeg( userdata im, string fPath[, float quality = 1, bool delete = false] ); bool imageGetAlphaBlending( userdata im ); bool imageSetAlphaBlending( userdata im, bool blendmode ); bool imageGetAntiAlias( userdata im ); bool imageSetAntiAlias( userdata im, bool enabled ); bool imageGetInterlace( userdata im ); bool imageSetInterlace( userdata im, bool interlace ); bool imageGetSaveAlpha( userdata im ); bool imageSetSaveAlpha( userdata im, bool savealpha ); bool/int imageColorAllocate( userdata im, int red, int green, int blue); bool/int imageColorAllocateAlpha( userdata im, int red, int green, int blue, int alpha); bool/int imageColorClosest( userdata im, int red, int green, int blue); bool/int imageColorClosestAlpha( userdata im, int red, int green, int blue, int alpha); bool/int imageColorExact( userdata im, int red, int green, int blue); bool/int imageColorExactAlpha( userdata im, int red, int green, int blue, int alpha); bool/int imageColorResolve( userdata im, int red, int green, int blue); bool/int imageColorResolveAlpha( userdata im, int red, int green, int blue, int alpha); bool/int imageGetColorAt( userdata im, int x, int y); bool imageSetColorAt( userdata im, int x, int y, int color); bool imageColorDeallocate( userdata im, int color ); bool/int imageColorsTotal( userdata im ); bool/int imageColorSpecial( string name ); -- name can be: styled, brushed, styledbrushed, tiled, transparent, antialiased bool/int imageFontHeight( int font ); -- font : 1 - 5 bool/int imageFontWidth( int font ); -- font : 1 - 5 bool imageChar( userdata im, int font, int x, int y, string char, int color); bool imageCharUp( userdata im, int font, int x, int y, string char, int color); bool imageString( userdata im, int font, int x, int y, string char, int color); bool imageStringUp( userdata im, int font, int x, int y, string char, int color); bool/int imageTtfText( userdata im, int size, int angle, int x, int y, int color, string fontFile, string text); bool/table imageTtfBBox( int size, int angle, string fontFile, string text); bool/table imageGetStyle( userdata im ); bool imageSetStyle( userdata im, table style ); bool/int imageGetThickness( userdata im ); bool imageSetThickness( userdata im, int thickness ); bool/userdata imageGetBrush( userdata im ); bool imageSetBrush( userdata im, userdata brush ); bool/userdata imageGetTile( userdata im ); bool imageSetTile( userdata im, userdata tile ); bool/int imageLine( userdata im, int x1, int y1, int x2, int y2, int color ); bool/int imageArc( userdata im, int cx, int cy, int w, int h, int start, int end, int color ); bool/int imageRectangle( userdata im, int x1, int y1, int x2, int y2, int color ); bool/int imageEllipse( userdata im, int cx, int cy, int w, int h, int color ); bool/int imageFill( userdata im, int x, int y, int color ); bool/int imageFillToBorder( userdata im, int x, int y, int border, int color ); bool/int imageFilledArc( userdata im, int cx, int cy, int w, int h, int start, int end, int color[, table style] ); bool/int imageFilledRectangle( userdata im, int x1, int y1, int x2, int y2, int color ); bool/int imageFilledEllipse( userdata im, int cx, int cy, int w, int h, int color ); bool imageDestroy( userdata im ); bool imageCleanup( userdata resource ); More info: https://wiki.multitheftauto.com/wiki/Modules/Texturizer Changelog: Version 0.9.1 - 30.12.2010 Initial Release Bugs and Requests: Even though i created a lot of tests into a resource some bugs may still need squashing, hence the version number. Due to my work and school i wont be extra active on developing this, but i'll try to update the module as often as i can. PS: I will add the function documentation to wiki soon, but since i mostly added GD functions that exist in php-gd you can use its documentation for more in-depth info. The function names should be same but capitalization is not. PS2: I shall tidy up and add instructions for build to the source tomorrow or the day after that, too sleepy at the moment. Anyways, the link to current source is here: http://www.mediafire.com/?i4uxsv2fctox6wz. NOTICE: The txdContainerAddImage currently only supports png images... Will add gdImagePtr versions later.
  3. GD libary offers various functions to deal with images so you could indeed use various background images and even drawing or etc. So to answer your question, yes, any image can be used to create the ad... But since i haven't ported all the functions the module only has the following ones... bool/int createTxdContainer( void ) bool txdContainerAddImage( int container, string name, string filePath[, bool compress, string alphaname] ) bool saveTxdContainer( int container, string fName ) bool/userdata imageCreateTrueColor( int w, int h ) bool/userdata imageCreateFromPng( string File ) bool imagePng( userdata im, string fPath ) bool/int imageColorAllocate( userdata im, int red, int green, int blue) bool/int imageColorAllocateAlpha( userdata im, int red, int green, int blue, int alpha) bool/int imageTtfText( userdata im, int size, int angle, int x, int y, int color, string fontFile, string text) bool/int imageTtfBBox( int size, int angle, string fontFile, string text) bool/int imageFill( userdata im, int x, int y, int color ) bool/int imageDestroy( userdata im ) PS: Im hoping to upload another video at the end of this week which will show the first usable version of my Advertisement Script. TO NeedSumHelp: Eestlane jah, serveriks on Fööniks mis veel küll arendusjärgus.
  4. And which Qt element is it? I tried both QSlider and QScrollbar, none of those doesn't provide the scrollbar. The scrollbar is not even in the Supported widgets list, so i don't have any idea about the "QT thing that makes it". BTW: I'm not referring to a QScrollArea(guiCreateScrollPane).
  5. Nice, but what about the scrollbars(GuiCreateScrollBar)?
  6. Something i'm making for Phoenix. It consists of a module which can create a texture archive from png sources with lua, and two scripts, one of them is just a container for images and the other does the work. The module is a compilation of TexureWriter and helper classes by me & JorX and gd libary for the image creation part. I also used a libary called squish to compress the textures in archive to DXT1. Anyways heres the video of what i already have...
  7. ORANGE FTW! Jyrno42 - Orange42 PS: I should really clean out those peels of oranges on my table...
  8. Win 7 32bit professional, work like a charm, only windowed mode has some problems but doesn't it for everyone? Also, users in my community have more problems on vista, hence the quite popular expression there: "Join the 7 club, and you'll have no problems."
  9. Yeah, got it working also, but which character set or special symbols do i have to use to use some in outputChatBox?
  10. The first part of the sentence can't be true, can it? Cause for me the characters "öäüõ" don't work.
  11. After Googleing like a madman i found that GLIBCXX_3.4.9, is not provided for Centos yet, the last version was 3.4.8 which i had installed, therefor yum didn't update it. I searched and found a solution for it from: http://www.eurocardsharing.com/335925-post3.html Now the server is working.
  12. Well, I've been tying to get the precompiled package to work, but it fails with the following error: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/mtasa/mta_linux-1.0.3/xmll.so) ERROR: Loading XML library (xmll.so) failed! Any ideas? /usr/lib/libstdc++.so.6 does exist. and is updated to latest version. I'm thinking of building it myself, but that seems to out of scope for me, as i've never used GIT and the tutorial for building is for debian. Thanks in advance, Jyrno42
  13. Thanks, 50p. After some hair pulling I got it working with skin 13. But not with 7.
  14. I wanted to test out the custom skin texture feature and i have a problem. My testing script has two scripts. server.lua -- A copy from wiki, just for testing. function joinHandler() local x = 1959.55 local y = -1714.46 local z = 10 spawnPlayer(source, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to My Server", source) setPedSkin ( source, 7 ) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) client.lua function modStuff() local txd_7 = engineLoadTXD ( ":HELL/7.txd" ) engineImportTXD ( txd_7, 7 ) outputChatBox("IMODS") end addEventHandler( "onClientResourceStart", getRootElement( ), function ( startedRes ) modStuff(); end ); Both of the messages are showing, and debug script doesn't have anything. But I spawn with the default version of skin 7. BTW: Yes the skin file is in my meta.xml .
  15. Thanks for your help. I wonder why i didnt think about that before.
×
×
  • Create New...