SA-MP Forums Archive
invisible objects - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: invisible objects (/showthread.php?tid=353899)



invisible objects - EvenemE - 24.06.2012

ok, im not good at scripting, but i know the basics. Im actually so tired of trying to do it by myself so i need you help so much.

Ok so I try to do invisible objects. Of course it's impossible because if i do it like
Код:
CreateObject(17699, 810, -2535.1000976563, 83.300003051758, 0, 0, 0, 0);
it looks like



so i try with setobjectmaterial, but i don't know how to. So is that possible to replace the texture of the object with "nothing" to make object totally transparent? If so, please give me an example.

Btw. my point is to create invisible fence, with possibility to shoot thorugh it. So, any ideas?

thank you


Re: invisible objects - Badger(new) - 24.06.2012

Hi.

Although I am unable to recommend how to make an object invisable using the material function, an alternative solution would be to use SetPlayerWorldBounds.

This will basically prevent the player from running outside of a rectangular/square area.
It will also allow players to shoot outside the area, while objects may not provide this.


You could also make your own version of the function by checking the player's coordinates against the coordinates of a square/rectangular area, by using a timer.


Re: invisible objects - MP2 - 24.06.2012

Set the material to 18646, "matcolours", "black", 0x00FFFFFF


Re: invisible objects - EvenemE - 24.06.2012

Код:
new xxx;
xxx = CreateObject(17699, 807.79998779297, -2535.1000976563, 83.300003051758, 0, 0, 0);
SetObjectMaterial(xxx, 18646, 0, "matcolours", "black", 0x00FFFFFF);
is that correct?


Respuesta: Re: invisible objects - [DOG]irinel1996 - 24.06.2012

Quote:
Originally Posted by EvenemE
Посмотреть сообщение
Код:
new xxx;
xxx = CreateObject(17699, 807.79998779297, -2535.1000976563, 83.300003051758, 0, 0, 0);
SetObjectMaterial(xxx, 18646, 0, "matcolours", "black", 0x00FFFFFF);
is that correct?
Should work, but I think you won't be able to shoot through it. Not possible. =/


Re: invisible objects - MP2 - 25.06.2012

The collision stays.


Re: Respuesta: Re: invisible objects - EvenemE - 25.06.2012

Quote:
Originally Posted by irinel1996
Посмотреть сообщение
Should work, but I think you won't be able to shoot through it. Not possible. =/
doesnt work, object is created but there is no effect on it


Re: invisible objects - MP2 - 25.06.2012

What object are you using? You may have the wrong material index.


Re: invisible objects - Grand_Micha - 25.06.2012

Quote:
Originally Posted by EvenemE
Посмотреть сообщение
Код:
new xxx;
xxx = CreateObject(17699, 807.79998779297, -2535.1000976563, 83.300003051758, 0, 0, 0);
SetObjectMaterial(xxx, 18646, 0, "matcolours", "black", 0x00FFFFFF);
is that correct?
SetObjectMaterial(CreateObject(17699,bla),0,"none" ,"none",0x00000000};


Re: invisible objects - Skaizo - 25.06.2012

Quote:
Originally Posted by Grand_Micha
Посмотреть сообщение
SetObjectMaterial(CreateObject(17699,bla),0,"none" ,"none",0x00000000};
you are ok?
https://sampwiki.blast.hk/wiki/SetObjectMaterial