SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 18/10/2015, 03:55 PM   #1
DialUp
Big Clucker
 
DialUp's Avatar
 
Join Date: Jan 2014
Location: SIL, Russia
Posts: 102
Reputation: 144
Default S-ART v3. Place JPG on your map like an object!

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
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.
__________________
Let's make the custom world!
[place any picture in game with SAMP art include!!]

Last edited by DialUp; 18/10/2015 at 09:19 PM.
DialUp is offline   Reply With Quote
Old 18/10/2015, 04:20 PM   #2
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,519
Reputation: 437
Default Re: S-ART v3. Place JPG on your map like an object!

Nice job!
Abagail is offline   Reply With Quote
Old 18/10/2015, 04:31 PM   #3
Crystallize
High-roller
 
Join Date: Aug 2013
Posts: 1,592
Reputation: 314
Default Re: S-ART v3. Place JPG on your map like an object!

Good job dude thanks for this , you rock!
__________________
SAMP BATTLE GROUNDS
87.98.241.207:7780
Crystallize is offline   Reply With Quote
Old 18/10/2015, 04:32 PM   #4
Lordzy
High-roller
 
Join Date: Mar 2012
Location: NetherRealm
Posts: 2,765
Reputation: 1172
Default Re: S-ART v3. Place JPG on your map like an object!

You must include the source code for "SA_CO_3.exe".
__________________
Currently inactive - I don't play at any SA-MP servers nor work on anything in PAWN for now. The projects that I've done so far in PAWN, which requires updates will be taking some time.
Lordzy is offline   Reply With Quote
Old 18/10/2015, 04:33 PM   #5
AliDollar
Little Clucker
 
AliDollar's Avatar
 
Join Date: Nov 2014
Location: The Pig Pen.
Posts: 24
Reputation: 15
Default Re: S-ART v3. Place JPG on your map like an object!

Nice to see This Update,
keep it up Bro +rep
AliDollar is offline   Reply With Quote
Old 18/10/2015, 04:46 PM   #6
DialUp
Big Clucker
 
DialUp's Avatar
 
Join Date: Jan 2014
Location: SIL, Russia
Posts: 102
Reputation: 144
Default Re: S-ART v3. Place JPG on your map like an object!

Quote:
Originally Posted by Lordzy View Post
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.
__________________
Let's make the custom world!
[place any picture in game with SAMP art include!!]
DialUp is offline   Reply With Quote
Old 18/10/2015, 05:39 PM   #7
PT
Godfather
 
PT's Avatar
 
Join Date: Nov 2012
Location: Portugal
Posts: 7,193
Reputation: 775
Default Re: S-ART v3. Place JPG on your map like an object!

Well where is created that "image.inc"?

Is not create anything here... It support PNG images too?
PT is offline   Reply With Quote
Old 18/10/2015, 06:18 PM   #8
DialUp
Big Clucker
 
DialUp's Avatar
 
Join Date: Jan 2014
Location: SIL, Russia
Posts: 102
Reputation: 144
Default Re: S-ART v3. Place JPG on your map like an object!

Quote:
Originally Posted by PT View Post
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.









__________________
Let's make the custom world!
[place any picture in game with SAMP art include!!]
DialUp is offline   Reply With Quote
Old 18/10/2015, 06:49 PM   #9
SecretBoss
Gangsta
 
SecretBoss's Avatar
 
Join Date: Dec 2014
Location: Greece
Posts: 820
Reputation: 102
Default Re: S-ART v3. Place JPG on your map like an object!

Great Job, +REPed
__________________
SecretBoss is offline   Reply With Quote
Old 18/10/2015, 07:04 PM   #10
PT
Godfather
 
PT's Avatar
 
Join Date: Nov 2012
Location: Portugal
Posts: 7,193
Reputation: 775
Default Re: S-ART v3. Place JPG on your map like an object!

Quote:
Originally Posted by DialUp View Post
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)
PT is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] S-ART [place any picture on the map like an object!] DialUp Plugin Development 133 27/02/2017 10:03 AM
Copyobject does not spawn at the same place after edit object haridz Scripting Help 0 01/05/2015 05:32 PM
Place object in mouth Chrillzen Scripting Help 1 25/04/2013 06:37 PM
[Map] [MAP] Eat Place + Some object Kasis Maps 9 21/07/2010 10:25 AM
moving object on the same place i've spawned it... *BueNoOo* Help Archive 9 11/11/2009 08:31 AM


All times are GMT. The time now is 02:36 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.