Callback OnPlayerClickTextDraw is not working - 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: Callback OnPlayerClickTextDraw is not working (
/showthread.php?tid=653639)
Callback OnPlayerClickTextDraw is not working -
Geebrox - 08.05.2018
I have 2 modules which must be called when a player clicks specific textdraw.
In the main gamemode:
PHP код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
printf("td: %d", _:clickedid);
DSchool_OnPlayerClickTD(playerid, clickedid);
return 1;
}
In the first module:
PHP код:
stock DSchool_OnPlayerClickTD(playerid, Text:td)
{
printf("ds: %d", _:td);
DSchoolUI_OnPlayerClickTD(playerid, td);
}
And in the second module:
PHP код:
stock DSchoolUI_OnPlayerClickTD(playerid, Text:td)
{
printf("ui: %d", _:td);
if(td == TD_dschoolui_monitor[e_TD_MONITOR_BRAND_TIP])
{
SendClientMessage(playerid, -1, "working!");
}
}
But I can't see any actions and even there have not any logs in the server log file. What can I do?
P.S.
TextDraw:
PHP код:
TD_dschoolui_monitor[e_TD_MONITOR_BRAND_TIP] =
TextDrawCreate(320.0, 295.0, "Click_here_to_unlock");
TextDrawFont(TD_dschoolui_monitor[e_TD_MONITOR_BRAND_TIP], 1);
TextDrawLetterSize(TD_dschoolui_monitor[e_TD_MONITOR_BRAND_TIP], 0.3, 1.2);
TextDrawAlignment(TD_dschoolui_monitor[e_TD_MONITOR_BRAND_TIP], 2);
TextDrawSetShadow(TD_dschoolui_monitor[e_TD_MONITOR_BRAND_TIP], 0);
TextDrawSetOutline(TD_dschoolui_monitor[e_TD_MONITOR_BRAND_TIP], 0);
TextDrawColor(TD_dschoolui_monitor[e_TD_MONITOR_BRAND_TIP], -1111242753);
TextDrawUseBox(TD_dschoolui_monitor[e_TD_MONITOR_BRAND_TIP], 1);
TextDrawBoxColor(TD_dschoolui_monitor[e_TD_MONITOR_BRAND_TIP], 0);
TextDrawTextSize(TD_dschoolui_monitor[e_TD_MONITOR_BRAND_TIP], 12.0, 88.0);
TextDrawSetSelectable(TD_dschoolui_monitor[e_TD_MONITOR_BRAND_TIP], 1);
Re: Callback OnPlayerClickTextDraw is not working -
Geebrox - 08.05.2018
The problem was in the filterscript "aview". I guess that "aview" blocks the callback "OnPlayerClickTextDraw". Sorry for disturbing.