podloga7 = TextDrawCreate(434.823577, 379.750030, "X");
TextDrawLetterSize(podloga7, 0.449999, 1.100000);
TextDrawAlignment(podloga7, 1);
TextDrawColor(podloga7, -1);
TextDrawSetShadow(podloga7, 0);
TextDrawSetOutline(podloga7, 1);
TextDrawBackgroundColor(podloga7, 51);
TextDrawFont(podloga7, 1);
TextDrawSetProportional(podloga7, 1);
///
TextDrawSetSelectable(podloga7, true);
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == podloga7)
{
CancelSelectTextDraw(playerid);
TextDrawHideForPlayer(playerid, podloga0);
TextDrawHideForPlayer(playerid, podloga1);
TextDrawHideForPlayer(playerid, podloga2);
TextDrawHideForPlayer(playerid, podloga3);
TextDrawHideForPlayer(playerid, podloga4);
TextDrawHideForPlayer(playerid, podloga5);
TextDrawHideForPlayer(playerid, podloga6);
TextDrawHideForPlayer(playerid, podloga7);
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/uhvatimeakomozes", true))
{
TextDrawShowForPlayer(playerid, podloga0);
TextDrawShowForPlayer(playerid, podloga1);
TextDrawShowForPlayer(playerid, podloga2);
TextDrawShowForPlayer(playerid, podloga3);
TextDrawShowForPlayer(playerid, podloga4);
TextDrawShowForPlayer(playerid, podloga5);
TextDrawShowForPlayer(playerid, podloga6);
TextDrawShowForPlayer(playerid, podloga7);
TextDrawShowForPlayer(playerid, podloga8);
return 1;
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/uhvatimeakomozes", true))
{
TextDrawShowForPlayer(playerid, podloga0);
TextDrawShowForPlayer(playerid, podloga1);
TextDrawShowForPlayer(playerid, podloga2);
TextDrawShowForPlayer(playerid, podloga3);
TextDrawShowForPlayer(playerid, podloga4);
TextDrawShowForPlayer(playerid, podloga5);
TextDrawShowForPlayer(playerid, podloga6);
TextDrawShowForPlayer(playerid, podloga7);
TextDrawShowForPlayer(playerid, podloga8);
TextDrawSetSelectable(podloga0, 1); // repeat for the ones u want selectable
return 1;
}
return 0;
}
|
Also, it's easier to just do new podloga[9]; instead of podloga0...8, you can loop them and show them/hide them without using a shit laod of lines
|
TextDrawHideForPlayer(playerid, podloga7);
