SA-MP Forums Archive
Checking if PlayerText3D exists - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Checking if PlayerText3D exists (/showthread.php?tid=475455)



Checking if PlayerText3D exists - Kwarde - 13.11.2013

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


Re: Checking if PlayerText3D exists - Konstantinos - 13.11.2013

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



Re: Checking if PlayerText3D exists - Kwarde - 13.11.2013

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