SA-MP Forums

Go Back   SA-MP Forums > SA-MP > General

Reply
 
Thread Tools Display Modes
Old 14/12/2018, 11:07 AM   #1
m1n1vv
Big Clucker
 
m1n1vv's Avatar
 
Join Date: May 2013
Posts: 65
Reputation: 37
Default Effect with AttachObject

Kalcor, why AttachObjectToObject makes this effect?
Before/after:

PHP Code:
static obj[2];
obj[0] = CreateObject(194810.00.030.00.00.0180.0);
obj[1] = CreateObject(194810.00.00.00.00.00.0);
SetObjectMaterialText(obj[1], "Text"0130"Arial"600, -1, -167772161);
AttachObjectToObject(obj[1], obj[0], 0.00.00.00.00.00.0); 
__________________
[Include] UICompass
[Tutorial] Object collision in 3ds Max

Last edited by m1n1vv; 15/12/2018 at 07:06 AM.
m1n1vv is offline   Reply With Quote
Old 15/12/2018, 03:16 AM   #2
Kalcor
SA-MP Developer
 
Join Date: Apr 2005
Posts: 996
Reputation: 2730
Default Re: Effect with AttachObject

Most of the problems you'll have with SetObjectMaterialText revolve around alpha blending. The fontcolor and backcolor parameters take ARGB values. The material will use different alpha blending modes depend on whether the alpha value is set to 0xFF (no transparency) or lower. If you use fontcolor 0xFFFFFFFF (white) and backcolor 0xFF000000 (black), I don't think you'll see any difference.

If you're going to attach text to another object, you need to attach it slightly forward, otherwise you'll come across something called Z-fighting (depth-fighting), which is where the 3D renderer can't tell which object is in front and which is behind.
Kalcor is offline   Reply With Quote
Old 15/12/2018, 07:57 AM   #3
m1n1vv
Big Clucker
 
m1n1vv's Avatar
 
Join Date: May 2013
Posts: 65
Reputation: 37
Default Re: Effect with AttachObject

Kalcor, thank you. But on the contrary I like this effect. I use an object without a background. With the weather ID 7 text bad seen. Without AttachObject can do this effect? 19475-19483 objects are not enough lighting.



With AttachObject on hosting will not work. I use streamer. Streamer requires the function AttachPlayerObjectToObject. This function in the plugin YSF. YSF kills my server.

Sorry for my bad English.
__________________
[Include] UICompass
[Tutorial] Object collision in 3ds Max
m1n1vv is offline   Reply With Quote
Old 23/12/2018, 06:51 AM   #4
m1n1vv
Big Clucker
 
m1n1vv's Avatar
 
Join Date: May 2013
Posts: 65
Reputation: 37
Default Re: Effect with AttachObject

And why this effect when attaching an object to the player?
__________________
[Include] UICompass
[Tutorial] Object collision in 3ds Max
m1n1vv is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DFT-30 AttachObject bug Juonis Scripting Help 2 04/02/2017 09:32 PM
[Ajuda] AttachObject Spectral Português/Portuguese 1 01/09/2014 04:08 PM
AttachObject [HELP] LazyGamer99 Scripting Help 4 19/03/2014 12:31 PM
[Ajuda] attachobject VeNuZ_ Português/Portuguese 4 24/06/2013 11:38 PM
[Ajuda] AttachObject Nikeeziin_Map Português/Portuguese 3 15/12/2012 11:10 AM


All times are GMT. The time now is 03:26 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.