18.10.2015, 15:55
(
Последний раз редактировалось DialUp; 18.10.2015 в 21:19.
)
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
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.
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);
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.