[Include] S-ART v3. Place JPG on your map like an object!
#1

You may know my previous releases such as plugin, or tool

Both weren't very convenient, so I rewrote everything on Pawn!

Download

Now you need just several simple steps to place the picture on map:

let's assume you have the picture "image.jpg"

1. Drag-and-Drop "image.png" on the converter (SA_CO_3.exe)
2. You'll get "image.inc" with the two-dimensional array named "image"
2. Modify the name "image" (if you need)
3. Include both "image.inc" and "CA3.inc" into your gamemode
4. Use CreateArt3, or CreateDynamicArt3!! For example, CreateArt3 ( image, 7, 1430, -643, 10, 0 ,0 ,0);

5. DestroyArt works similar with DestroyObject - pass the returned art ID to it.

Hints:

- Resulting image in game consist of 15x15 pixels blocks, so it's better to cut/resize your original image to achieve better results!
- Don't use large images, it wastes objects limit and produces connection lags. 150x150 image is fine.

How to use:

Functions CreateArt3 and CreateDynamicArt3 call well-known CreateObject, or CreateDynamicObject funcs, so the parameters are almost identical. The only difference is you must use picture description and art type instead of the object ID:

CreateArt3 ( image_description[][], art_type, Float:PositionX, Float:PositionY .... );

image_description - is a name of the two-dimensional array variable in the include, generated by converter.


Last thing. What is the 'art_type'?
as you must know, SA:MP doesn't support object resize, so I had to search for existing objects with specific size and options. In previous releases I used only 4 art types, now I found more good objects!!





the whole example was generated with code
Код:
CreateDynamicArt3(coco, 0, -630.2,1879.167, 34.0,   90, 0, 0); 
CreateDynamicArt3(coco, 1, -630.2,1879.167, 50.0,   90, 0, 180); 
CreateDynamicArt3(coco, 2, -640.9,1879.167, 50.0,   90, 0, 180); 
CreateDynamicArt3(coco, 3, -640.9,1879.167, 45.0,   -90, 0, 180); 
CreateDynamicArt3(coco, 4, -626.2,1879.167, 16.0,   0, 0, -90); 
CreateDynamicArt3(coco, 5, -648.2,1879.167, 47.0,    90, 0, 180); 
CreateDynamicArt3(coco, 6, -703.2,1879.167, 30.0,    0, 0, 90); 
CreateDynamicArt3(coco, 7, -733.2,1879.167, 10.0,    0, 0, -90)); 
CreateDynamicArt3(coco, 8, -653.2,1879.167, 23.0,    0, 0, -90)); 
CreateDynamicArt3(coco, 9, -661.7,1879.167, 50.0,    90, 0, 180);
as you can see, types 0 and 6 produce the mirrored image, and 2 & 3 are almost identical.

Type 4 is pretty weird - it looks OK at night, but overbright at daylight.

I like Type 5 - it gives the best image color, and not very large.

almost all types have their own rotation angles because of different objects used... yep, you will have to find right angles to place it on your map. (will try to fix that later!)


BLOCK SIZES (how large the image will be):
(1 block = 15x15 pixels)

TYPE 0, 1, 9 = 1.48 x 1.48
TYPE 2, 3 = 0.42 x 0.42 (the smallest one)
TYPE 4 = 1.98 x 1.98 (looks weird in daylight)
TYPE 5 = 0.995 x 0.995 (best colors)
TYPE 6 = 5.875 x 5.075 (not square!)
TYPE 7 = 0.51 x 0.51
TYPE 8 = 3.18 x 3.48 (also not square!)


damn, I'm bored writing this. release is raw, but usable. go test it now!

will update this post later.
Reply
#2

Nice job!
Reply
#3

Good job dude thanks for this , you rock!
Reply
#4

You must include the source code for "SA_CO_3.exe".
Reply
#5

Nice to see This Update,
keep it up Bro +rep
Reply
#6

Quote:
Originally Posted by Lordzy
Посмотреть сообщение
You must include the source code for "SA_CO_3.exe".
erm. the code is based on CxImage Demo #2 and doesn't look good (some debug stuff, weird bugfixes, etc)..
anyways, added.
Reply
#7

Well where is created that "image.inc"?

Is not create anything here... It support PNG images too?
Reply
#8

Quote:
Originally Posted by PT
Посмотреть сообщение
Well where is created that "image.inc"?

Is not create anything here... It support PNG images too?
it support PNG images. the result .inc file must be in the same folder with original image. (it will have the same name as picture).

I think you just don't understand what the "Drag-and-Drop" means.









Reply
#9

Great Job, +REPed
Reply
#10

Quote:
Originally Posted by DialUp
Посмотреть сообщение
I think you just don't understand what the "Drag-and-Drop" means.
I know what means, the problem is.

I Drag an Drop and that just close and dont create anything.

2є try i run as administrator i drag and drop that dont close but dont create the file too.

What can be?

( I tested with mine images and your "coco" image and nothing)
Reply
#11

very weird. I put pause everywhere, it shouldn't just exit w/o any output.

try this, non-unicode version
(doesn't support non-english file names + may require some DLLs)

you can also run it from command line
(win+R -> cmd -> cd C:/test/ -> SA_CO_3.exe image.png)
Reply
#12

C'est pour finir le weekend dans le lit ! a la bien

I created a mirror here :)
Reply
#13

Great work DialUp as always !
Reply
#14

Quote:
Originally Posted by DialUp
Посмотреть сообщение
very weird. I put pause everywhere, it shouldn't just exit w/o any output.

try this, non-unicode version
(doesn't support non-english file names + may require some DLLs)

you can also run it from command line
(win+R -> cmd -> cd C:/test/ -> SA_CO_3.exe image.png)
Well this hate me dont work.


I'm using Windows 10 can that be the font of the problem?
Reply
#15

Quote:
Originally Posted by PT
Посмотреть сообщение
Well this hate me dont work.


I'm using Windows 10 can that be the font of the problem?
I use Win10, too. Added the example .bat file into the pack.

DON'T Drag-n-Drop the image INTO black window
Drop in to EXE FILE.

(sorry if you do exactly as I say and it just doesn't work... I think you're opening the EXE and trying to put image there..)
Reply
#16

Wow....My Little Pony....
Never thought I'd see my main subject from work and my hobby in one image.
Anyways, you did it again with this awesome stuff, so here's my +rep. Keep it up!
Reply
#17

Good Work!

You made something impossible possible.

Can you please add GitHub or pastebin links?

Not everyone can access dropbox.
Reply
#18

Quote:
Originally Posted by Yashas
Посмотреть сообщение
Good Work!

You made something impossible possible.

Can you please add GitHub or pastebin links?

Not everyone can access dropbox.
A bit higher on this page MpK posted the mirror link.
Reply
#19

Quote:
Originally Posted by PT
Посмотреть сообщение
Well this hate me dont work.


I'm using Windows 10 can that be the font of the problem?
You're a noobish, it works fine

@Topic -> Hint: If you use streamer and want to see the full big images from far, just use:

Код:
public OnGameModeInit()
{
    Streamer_SetVisibleItems(STREAMER_TYPE_OBJECT, 999);
    return 1;
}
And increase the draw distance of the img objects
Reply
#20

Well i have good news, i updated the Microsoft .NET Framework and now it's working, strange but i dont care now is working, thanks for all DialUp!

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
You're a noobish, it works fine
-.-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)