12.05.2013, 10:34
Hello.
I'm writting a problem I'm experiencing right now. I added a command that shows IDs of all object IDs and their model IDs using 3D texts. I have no idea why, but in-game they don't show. Let me show the code.
As you see, I added a 'print' thing to test how does it work. It works perfectly, but I don't know why 3D texts not (everything work except this). And another thing that looks strange. If I delete Delete3DTextLabel line, when I use this command, IDs are visible... Only for 0.5 second (or even less), even when I'm not moving. Why do they disappear? Even if I don't use any other commands or timers for labels?
I hope someone will find a solution of that problem.
I'm writting a problem I'm experiencing right now. I added a command that shows IDs of all object IDs and their model IDs using 3D texts. I have no idea why, but in-game they don't show. Let me show the code.
Код:
#define MaxObjects 500
new Object[MaxObjects];
new ObjectModelID[MaxObjects];
new Text3D:Label[MaxObjects];
<some other stuff>
dcmd_showids(playerid,params[])
{
#pragma unused params
for(new i = 0; i < MaxObjects; i++)
{
new string[64], Float:X, Float:Y, Float:Z;
Delete3DTextLabel(Label[i]);
if(IsValidObject(Object[i]))
{
GetObjectPos(Object[i],X,Y,Z);
format(string,sizeof(string),"%d {FFFF00}|{3333FF} %d",i,ObjectModelID[i]);
Label[i] = Create3DTextLabel(string,0x3333FFFF,X,Y,Z,40.0,0,0);
print(string);
}
}
SendClientMessage(playerid,0xFFFF00FF,"Object IDs are now visible");
return 1;
}
I hope someone will find a solution of that problem.

