Checking if PlayerText3D exists
#1

Nevermind, I can use Incognito's streamer to do this. I am still curious though

Hello!

I am working on a new project, and I am wondering if it is somehow possible to check if a PlayerText3D exists. I tried something (I thought that'd work) but I get the tag mismatch error. This is how I have done it now;

The vars I tried to check it with:
pawn Код:
enum pInfo
{
    PlayerText3D:pLabelNews,
    PlayerText3D:pLabelPCSocial,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
And then I tried this (in OnPlayerSpawn, to prevent textdraws from creating twice)
pawn Код:
if (PlayerInfo[playerid][pLabelNews] == INVALID_3DTEXT_ID)
    PlayerInfo[playerid][pLabelNews] = Create..; //Creating the label, no errors
And on the lines where I check the value, I get the warning 213: tag mismatch warnings.

So, does anyone know how to fix that?

Kind regards,
Kevin
Reply
#2

pawn Код:
if (PlayerInfo[playerid][pLabelNews] == PlayerText3D:INVALID_3DTEXT_ID)
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
if (PlayerInfo[playerid][pLabelNews] == PlayerText3D:INVALID_3DTEXT_ID)
Ahaaa thank you very much!
And how stupid.. I tried if (PlayerText3D:PlayerInfo[playerid][pLabelNews] == INVALID_3DTEXT_ID) but no the one you sent.

Kind regards,
Kevin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)