Author Topic: Using a .png Image instead of a .DTS model  (Read 3931 times)

Is it possible to have an item such as a gun that doesnt use a model, but uses a png image instead. OR have a model for 3rd person (as in the person looking at you sees you have a gun) and a .png image for the player in FPV? And can i use this logic for sighting? As in aiming down the sights? I have the images ready.

You can use two different models but I don't think using a straight up .PNG will work. There is a way to make static shapes display just an image but idk how.

Alright thanks, but i have another question since we are talking about .png images
when i sight in my gun can i have a .PNG image display as the reticle instead of making the scope reticle part of the gun model?

you probably can but i wouldn't recommend it since its pretty much a texture required to download

It shouldnt be too bad, i was just planning on having .png imgaes for red dot sights and scopes. would

Code: [Select]
function XM8SCImage::onMount(%this, %obj, %slot) 
{
%obj.client.setControlCameraFov(80);
crossHair.setBitmap("add-ons/weapon_WarfarePack/RDS.png");
}

function XM8SCImage::onUnMount(%this, %obj, %slot) 
{
%obj.client.setControlCameraFov(90);
crossHair.setBitmap("base/client/ui/crosshair.png");

}
Work?

Why not put it to the test?

Alright so the above Functions work, however the images turn out, really, really small. How do i fix this? i use paint.net. I tried re-sizing the image but when i update the .png image and retest, the image in game stays at the same size. Any ideas?

Alright so the above Functions work, however the images turn out, really, really small. How do i fix this? i use paint.net. I tried re-sizing the image but when i update the .png image and retest, the image in game stays at the same size. Any ideas?
Lol. You must be doing it on a single player server or something, because the above function will never work on an internet server. You can't modify a GUI element(crossHair) from the server without a client command. And there is no client command to change the crosshair.

I almost thought that this was like the system from minecraft and was intrigued.

So all in all this is impossible.

I think you can do this with client add-ons. I'm not sure but then you'd have to make the players that use this pack a client mod.