Forum

> > CS2D > Scripts > picture image error
Forums overviewCS2D overview Scripts overviewLog in to reply

English picture image error

13 replies
To the start Previous 1 Next To the start

old picture image error

lioncyber97
User Off Offline

Quote
i installed a script called :" custom weapon by engine " ._.!
i instaled it correctly! i add to it some stuff weapon like barret and the skin picture is barret.png when i went to game this is what i see
IMG:https://i.upanh.com/vpgbop

can't see gun so how to make a skin for this lua [ bad english]
the side must be 32x32 or 32.64 or some thing ...

old Re: picture image error

Rainoth
Moderator Off Offline

Quote
If it's a script then the size shouldn't matter.
I suspect that the script is made to use ".jpg" or ".bmp" format instead of ".png" or it could be an error in a script.
You should check console and tell us if it says any errors there.

old Re: picture image error

EngiN33R
Moderator Off Offline

Quote
I cannot see the image. Any image that is a correct format should work in the script.

My scripts are generally made to support the .png format and I always encourage others to use it as well. It could be a script error, but that is highly unlikely, because what you're reportedly seeing cannot be caused by an error in the code.

You should upload your image to a different hosting site.

Spoiler >

old here is the image

lioncyber97
User Off Offline

Quote
when i delete-ED [ bad english ] the image and made new image .png , the size is 32x62 [ good size ] and not add anything and that happend :

IMG:https://img109.imageshack.us/img109/7141/gkm7.png





when i added some stuff to image , this thing happend :
IMG:https://imageshack.us/a/img836/9900/tgui.png

old Re: picture image error

EngiN33R
Moderator Off Offline

Quote
The hell? That's not supposed to happen. Upload the original image of the weapon that turns all white - not a screenshot, the original image.

As user MikuAuahDark said, you should try adding <m> at the end of the path to the image to mask the magenta pixels.

old wtf

lioncyber97
User Off Offline

Quote
when i added <m> to the path of picture , the result still the same
--------------------------------
IMG:https://imageshack.us/a/img526/6699/vz1w.png

---------------------------------

here is the weapon [ barret.bmp] i added :

IMG:https://img23.imageshack.us/img23/6465/j0ic.png


help please i try to change the bmp to png , chang background color ,add <m> to the path ... but nothing work
----------------------
after spent about 1 hour to found solution , i knew what is the problem ...
the problem is not about the engine script but it about the image when i add normal image [ edit by some skiner] it work normal (my lua hat mod , not engine custom weapon mod ) but when i try to edit the image this error happend...i don't know how to fix it because in too confused ...
last minutes i tried to add some hat to my hats mod ,every work correctly expect some hats i edited it via ms paint so i have a question how to make picture for lua script zzzzzzzzzzz


IMG:https://img824.imageshack.us/img824/9527/f0z.png
edited 1×, last 06.07.13 06:49:50 am

old Re: picture image error

EngiN33R
Moderator Off Offline

Quote
Your PNG has a white background. It's no wonder that the background is kept.

The PNG file has to have a transparent background. Windows' built-in Paint can't do that, so you'll need to have a more advanced image editing program, such as Paint.NET.

On the other hand, you could make an image with a magenta background and add <m> to the end of the file path, or make one with a black background - black should be removed automatically.

I personally use PNGs with transparent backgrounds all the time.

old Re: picture image error

D-D3ADxPro
User Off Offline

Quote
Cs2d Lua Image has written
PATH<b> - black pixels (rgb 0,0,0 or HEX #000000) will become invisible in the specified image (this mode is used by default but another masking method might be used if the image has been loaded before with another method. So please use this tag if masking of black pixels is important)


One way to fix this picture error:

So now, once you added the <b> at the end of the image path, and it will remove all the black parts, and it wont damage the file. Just make sure to edit the image that your having trouble with, and set the background to black!

Other ways to fix this picture error:

For the <m> part, you still had a white background. You were suppose to change it to magma. As @user EngiN33R: said, try to make a new image that has the magma color. then add <m> at the end of the image path, and it will remove the magma background.
edited 1×, last 06.07.13 10:29:27 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview