08.05.2018, 22:07
I have 2 modules which must be called when a player clicks specific textdraw.
In the main gamemode:
In the first module:
And in the second module:
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:
In the main gamemode:
PHP код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
printf("td: %d", _:clickedid);
DSchool_OnPlayerClickTD(playerid, clickedid);
return 1;
}
PHP код:
stock DSchool_OnPlayerClickTD(playerid, Text:td)
{
printf("ds: %d", _:td);
DSchoolUI_OnPlayerClickTD(playerid, td);
}
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!");
}
}
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);