3D text label not showing -
Blademaster680 - 18.07.2014
Hi
I am trying to make a dynamic door system, everything loads fine except the 3D text label that should be by the door.
The text doesn't even display in the game! The pickups get created in the correct locations, its just the text that
should be there to, isn't there...
Please help.
Here is the code:
Enum:
Код:
enum doorinfo
{
dID,
dName[32],
Float: dEPos[3],
Float: dIPos[3],
dInt,
dVW,
dLocked,
Text3D: dTextID,
dPickupID
}
new dInfo[MAX_DOORS][doorinfo];
Load:
Код:
stock Load_DynamicDoors()
{
new Query[512], savestr[25], savestr2[32], rows, fields;
for(new i = 1; i < MAX_DOORS; i++)
{
mysql_format(dbHandle,Query, sizeof(Query), "SELECT * FROM `Doors` WHERE `ID` = '%d'", i);
mysql_query(dbHandle,Query);
cache_get_data(rows, fields);
if(rows)
{
cache_get_field_content(0, "ID", savestr); dInfo[i][dID] = strval(savestr);
cache_get_field_content(0, "Name", savestr2); dInfo[i][dName] = savestr2;
cache_get_field_content(0, "ExtX", savestr); dInfo[i][dEPos][0] = floatstr(savestr);
cache_get_field_content(0, "ExtY", savestr); dInfo[i][dEPos][1] = floatstr(savestr);
cache_get_field_content(0, "ExtZ", savestr); dInfo[i][dEPos][2] = floatstr(savestr);
cache_get_field_content(0, "IntX", savestr); dInfo[i][dIPos][0] = floatstr(savestr);
cache_get_field_content(0, "IntY", savestr); dInfo[i][dIPos][1] = floatstr(savestr);
cache_get_field_content(0, "IntZ", savestr); dInfo[i][dIPos][2] = floatstr(savestr);
cache_get_field_content(0, "Interior", savestr); dInfo[i][dInt] = strval(savestr);
cache_get_field_content(0, "VW", savestr); dInfo[i][dVW] = strval(savestr);
cache_get_field_content(0, "Locked", savestr); dInfo[i][dLocked] = strval(savestr);
Create_DynamicDoors(i);
}
}
return 1;
}
Create:
Код:
stock Create_DynamicDoors(doorid)
{
new string[128];
format(string, sizeof(string), "%s", dInfo[doorid][dName]);
dInfo[doorid][dTextID] = Create3DTextLabel(string, -1, dInfo[doorid][dEPos][0], dInfo[doorid][dEPos][1], dInfo[doorid][dEPos][2]+0.7,10.0, 1, -1);
CreatePickup(1210, 23, dInfo[doorid][dEPos][0], dInfo[doorid][dEPos][1], dInfo[doorid][dEPos][2], 0);
Create3DTextLabel("Exit", 0x008080FF, dInfo[doorid][dIPos][0], dInfo[doorid][dIPos][1], dInfo[doorid][dIPos][2],10.0, 1, 0);
CreatePickup(1210, 23, dInfo[doorid][dIPos][0], dInfo[doorid][dIPos][1], dInfo[doorid][dIPos][2], 0);
return 1;
}
Re: 3D text label not showing -
Blast3r - 18.07.2014
You're setting the Virtual World to 1 therefore it's only visible for players in VW 1, so in case you don't have setting to VW 1 I'd suggest you change it to -1 (I think this is the code to all VWs) or 0.
pawn Код:
Create3DTextLabel("Exit", 0x008080FF, dInfo[doorid][dIPos][0], dInfo[doorid][dIPos][1], dInfo[doorid][dIPos][2],10.0, 1, 0);
To
pawn Код:
Create3DTextLabel("Exit", 0x008080FF, dInfo[doorid][dIPos][0], dInfo[doorid][dIPos][1], dInfo[doorid][dIPos][2],10.0, -1, 0);
Re: 3D text label not showing -
Blademaster680 - 18.07.2014
Nope. Still not showing 3dtext