Posts: 596
Threads: 75
Joined: Nov 2015
Try using:
Код:
if(playertextid == INVALID_TEXT_DRAW)
Or if it dosent work then use this include :
https://sampforum.blast.hk/showthread.php?tid=575261
And check if the textdraw is valid using this function
Код:
IsValidPlayerTextDraw(playerid, PlayerText:text);
Posts: 596
Threads: 75
Joined: Nov 2015
Quote:
Originally Posted by Sanady
First thing, I tried. Here is the result of the first try:
Код:
warning 213: tag mismatch
Also I don`t understand how should I check if is Invalid textdraw vaild? :O
|
Have you tried that include?
Posts: 1,506
Threads: 13
Joined: Jun 2015
Posts: 131
Threads: 4
Joined: Jul 2016
Reputation:
0
do it onplayerclicktextdraw idk why but it doesnt hide onplayerclickplayertextdraw
Posts: 6,242
Threads: 8
Joined: Jun 2008
Remember
PHP код:
Text:
// And
PlayerText:
are like float. You HAVE to use it correctly. This is where the error is coming from.
PHP код:
new PlayerText:gPlayerText
new Text:gServerText
PHP код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
PHP код:
if(clickedid == Text:INVALID_TEXT_DRAW)
Posts: 596
Threads: 75
Joined: Nov 2015
Quote:
Originally Posted by Sanady
Код:
warning 213: tag mismatch
|
It is showing the tag mismatch error because you are trying a "Global TextDraw" function on a "Player TextDraw"
Download this include:
https://sampforum.blast.hk/showthread.php?tid=575261
Here is the code for you:
PHP код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(IsValidPlayerTextDraw(playerid, playertextid /*your textdraw id*/))
{
//Do your work here
}
return 1;
}
Posts: 1,266
Threads: 6
Joined: Oct 2014
PHP код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid == INVALID_TEXT_DRAW)
{
//Do your work here
}
return 1;
}
Posts: 6,242
Threads: 8
Joined: Jun 2008
Jlalt has it... It calls OnPlayerClickTextDraw, not OnPlayerClickPlayerTextdraw when Esc is pressed.