SA-MP Forums Archive
[Help] Invisible object and touchable. - 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: [Help] Invisible object and touchable. (/showthread.php?tid=483728)



[Help] Invisible object and touchable. - Strain - 27.12.2013

Hello.

I want to create object that will be invisible but touchable.
I want - when I'll go to this object, I can touch him but I cant see him.

But that's not working, I can see the object.

Code:

PHP код:
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
new 
objectid = CreateDynamicObjectEx(8838, Pos[0], Pos[1], Pos[2]+0.3, 0, 0, 0, 0.0, 300.0, { -1 }, { -1 }, { -1 }); 
I tried to make this after that, but this is doesn't work:

PHP код:
1.
SetDynamicObjectMaterial
( objectid, 0, 8838, "blankmodel", "none", 0 );
2.
SetDynamicObjectMaterial
( objectid, 18646, 0, "matcolours", "black", 0x00FFFFFF); 
Thank you.


Re: [Help] Invisible object and touchable. - Strain - 28.12.2013

UP. Please?


Re: [Help] Invisible object and touchable. - Strain - 28.12.2013

Hey, someone?


Re: [Help] Invisible object and touchable. - Strain - 29.12.2013

/wave, anyone?


Re: [Help] Invisible object and touchable. - Strain - 31.12.2013

Help please? that is hard to solve that? but I'm sure that there is way for that.
Anyway, please someone help...


Re: [Help] Invisible object and touchable. - CutX - 31.12.2013

here you go mate,
a example cmd
PHP код:
YCMD:test(playerid, params[], help)
{
    new 
Float:Pos[3],obid;
    
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    
obid = CreateDynamicObject(8838, Pos[0], Pos[1], Pos[2]+0.3, 0.0, 0.0, 0.0);
    
SetDynamicObjectMaterial(obid,0,-1,"none","none",0x000000FF);
    
SetDynamicObjectMaterial(obid,1,-1,"none","none",0x000000FF);
    
SetDynamicObjectMaterial(obid,2,-1,"none","none",0x000000FF);
    
SetDynamicObjectMaterial(obid,3,-1,"none","none",0x000000FF);
    
SetDynamicObjectMaterial(obid,4,-1,"none","none",0x000000FF);
    return 
1;
} 
it's now invisible, like u wanted it 2 be

Happy new year btw !!!!!!


Re: [Help] Invisible object and touchable. - Strain - 31.12.2013

!! Thank you dude, you are realy helped me. I'm bad on SetObjectMaterial, I didnt use that till yet, but its usefull function. Thanks again and happy new year!