[Tool/Web/Other] SAMP arts
#1

PROJECT CONTINUES HERE AS INCLUDE
================================================== ==============
Did you want to place some picture on your map?
I made a tool to convert your images to SAMP objects with text!

Picture example (mode 1, 437x151 PNG image)

don't like ponies? ok, here is example of max possible quality without using streamer plugin (mode 3, 640x360 PNG image):

That's not photoshop, lol. Every player on your server will be able to see this picture.


F.A.Q.

Q: How to use it?
A:
1. Download this archive with the latest version of script (sources included)
2. Unpack the archive and execute run_cmd file, that will open command line
3. To see available options, type convert -help

4. Use the script by executing command with options, for example,
convert -i mypicture.png -o myinclude.inc -s "-760.0 1900.0 60.0" -m 2 -c 1
5. Add the result include file in your gamemode or filterscript, where you usually place CreateObject calls

Q: Picture? What picture should I use?
A: I recommend using small pictures to reduce objects amount, for example, 225x120 picture takes 120 objects. Every object contains 15x15 part of image, so it will be better to use image with width and height dividable by 15.

Q: What if I want to place several pictures on my map?
A: Since version 0.3, script uses directives to prevent collisions. Just place several includes in your script.

Q: I want to move the picture, but I don't want to execute the script every time. Is there any easier way?
A: Since v0.2, script places start coordinates in the top of the include file. Just modify them. Rotation is much harder to change, currently you have to re-build include to modify picture rotation

TUTORIAL (without comments)
[ame]http://www.youtube.com/watch?v=tH6Au0o346Q[/ame]

DOWNLOAD DEMO FILTERSCRIPT
P.S. If you want another art size, find square (or near to square) and single textured SA:MP object. I found only 4 good ones
made by DialUp, member of MSU Graphics and Media lab
Reply
#2

Can someone tell me how do we use the code? Can someone compile it?
Reply
#3

Python is interpreter. You need to install Python 2.7, all needed libs (PILlow, Scientific and NumPy), then just execute the script

actually, for example picture I've used smaller object type, but back side of picture was inverted, so I left bigger ones in the release.
Reply
#4

nice but i dont know how to use it :/
Reply
#5

can some one teach me how to use it?
this is my skype please add my skype DialUp and teach me this
I'll +REP you

amirab_best
Reply
#6

ehh... install everything below
python 2.7
pillow
numpy
scientific

then open convert.py with notepad and modify this code:
Code:
#rotation vector for the picture
angle = Vector(0,0,0)

#coordinates of picture center
start_pos = Vector(-757.512390, 1896.021484, 59.6)

#name of the picture file
picture_name = 'dash.png'

#name of the output file
out_name = 'dash.txt'
(coordinates and rotation are similar to CreateObject parameters)

picture name is path to the picture (for example, 'C:\\new_folder\\picture.png'), or just picture name if the picture in the same folder with script.
output file is text file name, where the pawn script will be placed.
example picture and output file are here
https://www.dropbox.com/s/tgl193bb561ryw5/pic.rar

After you get .txt file, just place code into your pawno script, in the place where you create objects (with #include "out.txt" or just copy-paste)

don't use large images! 300*200 is enough. If you need more quality, I'll modify script for smaller objects. But as I said, back side of picture will be damaged
Reply
#7

Wow its awesome. Great Work.

Keep it up.

+REP
Reply
#8

Nice good job!
Reply
#9

Nice job
Reply
#10

Thanks For Your Help, TESTED AND...
Holy Shit This Is Awesome +REP
Reply
#11

The converter software closes automatically... And i've already installed all python softwares :c
Reply
#12

Quote:
Originally Posted by HeLiOn_PrImE
Посмотреть сообщение
I do experience lag problems after loading my created map.
the picture is too large for your server (or I havent' understood you)
Quote:

I recommend using small images (~200x100)

Quote:
Originally Posted by n0minal
Посмотреть сообщение
The converter software closes automatically... And i've already installed all python softwares :c
you should run it from cmd line (see previous posts)

Quote:

WIN+R -> cmd -> cd "C:/converter" (path to unpacked archive) -> convert.exe -help

(same with .py script, just convert.py instead of convert.exe)

P.S. added two .bat files to the archive. One for running CMD in current folder, second is example of using the software
Reply
#13

I did it but it still get closing down...
Reply
#14

Quote:
Originally Posted by n0minal
Посмотреть сообщение
I did it but it still get closing down...
Updated the description.
Reply
#15

what streamer version was used in this script? '-'
Reply
#16

I have no streamer and didn't test it. Just added the option to change function names
Quote:

'CreateObject' into 'CreateDynamicObject'
'SetObjectMaterialText' into 'SetDynamicObjectMaterialText'
'SetObjectMaterial' into 'SetDynamicObjectMaterial'

non-dynamic version works fine on my PC
Reply
#17

hmm ok bro, streamed version got too much errors... I'll use non-dinamyc aswell...
Reply
#18

Quote:
Originally Posted by n0minal
Посмотреть сообщение
hmm ok bro, streamed version got too much errors... I'll use non-dinamyc aswell...
Probably, fixed. I still don't know should I use regular SetObjectMaterial... or Dynamic one
Reply
#19

Wow, this nifty program, but I'm from Brazil and I'm not very good at speaking English, but hey come on, how do you do to edit it? is to teach me a little because I open it in cmd but the windows can not open it ..

victorsantos361 is my skype if you have ..

or enter

My Server Fуruns

Regards,
Reply
#20

... added video tutorial (without comments)
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)