attach object with new texture
#1

look. when i attach that object to player, i have warning in game and i got old texture on this.
but when i dont attach this to player, object got new texture. whats wrong?
Code:
new object;
object = SetPlayerAttachedObject(playerid,0,19445,6,0.000000,-0.013999,-0.008999,0.000000,-0.999999,1.799999,1.002999,1.380000,1.190999);
SetObjectMaterialText(object, "||", 0, 140, "Arial", 200, 0, -16777216, -11726, 1);
Code:
Warning(opcode 0x108): Exception 0xC0000005 at 0x59F7A8
Reply
#2

bump, whos can help me?
Reply
#3

You must use the function "SetPlayerObjectMaterialText"
https://sampwiki.blast.hk/wiki/SetPlayerObjectMaterialText

Good Luck
Reply
#4

yes, but i need show new texture for all players, not only for me.
Reply
#5

Use foreach (include extra) or use the loop for().
Example:
Code:
for(new i; i < MAX_PLAYERS; i++)
{
      // Functions for every player
}
Reply
#6

SetPlayerAttachedObject doesn't return any objectid so you can't apply SetObjectMaterialText or SetPlayerObjectMaterialText to it. And unfortunately there isn't any other function which will set material text to SetPlayerAttachedObject
Reply
#7

Not Work!
Code:
	new object;
    object = SetPlayerAttachedObject(playerid,0,19445,6,0.000000,-0.013999,-0.008999,0.000000,-0.999999,1.799999,1.002999,1.380000,1.190999);

	for(new i; i < MAX_PLAYERS; i++)
	{
	      SetPlayerObjectMaterialText(playerid, object, "||", 0, 140, "Arial", 200, 0, -16777216, -11726, 1);
	}
@up
So, how can i change it on vehicle? I know, its possible.
Reply
#8

SetPlayerAttachedObject uses a different object pool. Objects that are attached to vehicles belong to the "normal" pool.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)