SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 02/01/2015, 12:24 AM   #1
DialUp
Big Clucker
 
DialUp's Avatar
 
Join Date: Jan 2014
Location: SIL, Russia
Posts: 102
Reputation: 144
Default S-ART [place any picture on the map like an object!]

PROJECT CONTINUES HERE AS INCLUDE
================================================== ==============
Hello! Some time ago I made the tool for using pictures in your gamemodes. Now I present the plugin with that feature!

It wasn't easy to use the tool, but now is't VERY easy. Just use CreateArt / DestroyArt functions like CreateObject / DestroyObject ones:

I changed the pattern, now second parameter is the art type:
CreateArt(path_to_png_image, art_type, other_default_parameters...)

example:
Code:
#include <s-art>
.......
new art = CreateArt("D:\\my_image.png", 2, -704.1531, 1849.0200, 18,   45, 45, 45, 100); 
//picture should be in 24-bit PNG type
.......
DestroyArt(art);
also now it supports streamer plugin (use CreateDynamicArt).

I'm total noob in plugin writing, so you can modify, improve or do whatever you want with it.
SOURCE CODE
(include and DLL files are in /build/ folder)

demo:

yeah, that's what this thing was made for. To place the photo of Redirect_Left (owner and creator of sumo server) to the map.

currently plugin supports 4 size types:
type 2, size = X
type 3, size ~= 3*X
type 1, size ~= 6*X
type 0, size ~= 12*X

(it's not easy to find not-shadowed almost square single-textured objexts!!)
(if you do REALLY need another sizes, ask me, there're few less convenient objects unused)

size types:


The result isn't perfect, the objects I've used aren't square, so resize your original pictures to achieve better results.

It's still VERY recommended to use pictures with dimensions multiple of 15
__________________
Let's make the custom world!
[place any picture in game with SAMP art include!!]

Last edited by DialUp; 18/10/2015 at 05:07 PM.
DialUp is offline   Reply With Quote
Old 02/01/2015, 12:31 AM   #2
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,142
Reputation: 445
Default Re: S-ART [place any picture on the map like an object!]

Glad to see this working as a plug-in; rather than a /manual/, frustrating process.
Abagail is offline   Reply With Quote
Old 02/01/2015, 12:32 AM   #3
Madzior_
Little Clucker
 
Madzior_'s Avatar
 
Join Date: Aug 2010
Posts: 25
Reputation: 3
Default Re: S-ART [place any picture on the map like an object!]

Finally! I'm going to use it in near future. Thanks again
Madzior_ is offline   Reply With Quote
Old 02/01/2015, 01:18 AM   #4
The_Scope
Huge Clucker
 
The_Scope's Avatar
 
Join Date: Dec 2011
Location: Argentina
Posts: 311
Reputation: 18
Default Respuesta: S-ART [place any picture on the map like an object!]

Great job!
The_Scope is offline   Reply With Quote
Old 02/01/2015, 02:01 AM   #5
Diabloa
Huge Clucker
 
Diabloa's Avatar
 
Join Date: Dec 2011
Location: Castillo
Posts: 393
Reputation: 100
Default Re: S-ART [place any picture on the map like an object!]

Really good job.
Diabloa is offline   Reply With Quote
Old 02/01/2015, 06:25 AM   #6
$$inSane
Gangsta
 
$$inSane's Avatar
 
Join Date: Feb 2012
Location: Behind you, you cant see me!!!
Posts: 658
Reputation: 56
Default Re: S-ART [place any picture on the map like an object!]

Have you solved the lag, i mean whenever i used the tool, player experienced lag. I think it was due to image streaming only.
__________________
$$inSane is offline   Reply With Quote
Old 02/01/2015, 06:32 AM   #7
DialUp
Big Clucker
 
DialUp's Avatar
 
Join Date: Jan 2014
Location: SIL, Russia
Posts: 102
Reputation: 144
Default Re: S-ART [place any picture on the map like an object!]

Quote:
Originally Posted by $$inSane View Post
Have you solved the lag, i mean whenever i used the tool, player experienced lag. I think it was due to image streaming only.
just use smaller images. more objects = more data to download = more lags

I can try to increase the pixel amount per object to reduce the total objects amount... last time I've tried to do that, there was limit of 2048 symbols in line (so all my pictures are made of 15*15 blocks, max 15*15*9 + 15 = 2040 symbols)
__________________
Let's make the custom world!
[place any picture in game with SAMP art include!!]
DialUp is offline   Reply With Quote
Old 02/01/2015, 06:42 AM   #8
$$inSane
Gangsta
 
$$inSane's Avatar
 
Join Date: Feb 2012
Location: Behind you, you cant see me!!!
Posts: 658
Reputation: 56
Default Re: S-ART [place any picture on the map like an object!]

Quote:
Originally Posted by DialUp View Post
just use smaller images. more objects = more data to download = more lags

I can try to increase the pixel amount per object to reduce the total objects amount... last time I've tried to do that, there was limit of 2048 symbols in line (so all my pictures are made of 15*15 blocks, max 15*15*9 + 15 = 2040 symbols)
Oh, i got it, all i need to use is 15* symmetry.

Also, do this supports .gif
__________________
$$inSane is offline   Reply With Quote
Old 02/01/2015, 06:54 AM   #9
DialUp
Big Clucker
 
DialUp's Avatar
 
Join Date: Jan 2014
Location: SIL, Russia
Posts: 102
Reputation: 144
Default Re: S-ART [place any picture on the map like an object!]

Quote:
Originally Posted by $$inSane View Post
Oh, i got it, all i need to use is 15* symmetry.

Also, do this supports .gif
no, it supports only 24-bit PNG images (to keep it small and simple - I can use giant library like OpenCV, but then it will require external DLLs). I think it's not so hard to re-save GIF in another format with something like Paint
__________________
Let's make the custom world!
[place any picture in game with SAMP art include!!]
DialUp is offline   Reply With Quote
Old 02/01/2015, 10:25 AM   #10
Tamer
High-roller
 
Tamer's Avatar
 
Join Date: Nov 2011
Location: Turkey
Posts: 1,103
Reputation: 172
Default Re: S-ART [place any picture on the map like an object!]

There's was a small tool written in phyton which did the same thing but yeah ofcourse this is better. Good job.

Oh okay, It was you who made the tool.
__________________
The three stages of truth:

- Ridicule.
- Violent opposition.
- Acceptance.


Quote:
The greatest hypnotist on the planet Earth is an oblong box in the corner of the room. It is constantly telling us what to believe is real. If you can persuade people that what they see with their eyes is what there is to see you've got them. you know because they'll laugh in your face of an explanation that portrays the biggest picture of what's happening... and they have.
Tamer 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
Object ! [Picture] ! dorperez Scripting Help 4 17/11/2011 08:29 PM
i need the id of the object : (Including picture) BurnOutt Help Archive 5 16/05/2010 07:12 PM
What's A object ID (Have Picture) maximus_corleone Help Archive 1 20/03/2010 12:59 PM
What is the object id of this picture? gtapolicemods Help Archive 2 18/02/2010 02:46 AM
I Need Object ID - Glass & Picture CamelJoe Help Archive 27 17/04/2009 09:41 PM


All times are GMT. The time now is 12:30 AM.


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