SA-MP Forums Archive
OnPlayerClickTextDraw problem - 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: OnPlayerClickTextDraw problem (/showthread.php?tid=597884)



OnPlayerClickTextDraw problem - MikkiMapper - 06.01.2016

Hi, it's me again.
I work at one very interesting project, but i have problem here:
But have a problem with TextDraw click.
I check wiki, do it, without errors, but nothing happens...
Here is mine step by step to create this:
(Who can tell me more...)
Код:
	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);
Then
Код:
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;
}
First i call this textdraw in command, maybe that is wrong or not?
Код:
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;
}



Re: OnPlayerClickTextDraw problem - MikkiMapper - 06.01.2016

Help?


Re: OnPlayerClickTextDraw problem - itsCody - 06.01.2016

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/uhvatimeakomozes"true))
    {
      
TextDrawShowForPlayer(playeridpodloga0);
      
TextDrawShowForPlayer(playeridpodloga1);
      
TextDrawShowForPlayer(playeridpodloga2);
      
TextDrawShowForPlayer(playeridpodloga3);
      
TextDrawShowForPlayer(playeridpodloga4);
      
TextDrawShowForPlayer(playeridpodloga5);
      
TextDrawShowForPlayer(playeridpodloga6);
      
TextDrawShowForPlayer(playeridpodloga7);
      
TextDrawShowForPlayer(playeridpodloga8);
      
TextDrawSetSelectable(podloga01); // 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


Re: OnPlayerClickTextDraw problem - MikkiMapper - 06.01.2016

Again, i cant click at that textdraw... When i put my command do nothing, only show textdraws nothing more... My mouse is in background, if you know what i meen.
Quote:
Originally Posted by itsCody
Посмотреть сообщение
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
I know for that, but that is't problem now xD


Re: OnPlayerClickTextDraw problem - SilverStand - 06.01.2016

Read this


Re: OnPlayerClickTextDraw problem - MikkiMapper - 06.01.2016

Read but again nothing.
Maybe i don't know how to explain, but i cant click at that textdraw, you know when i can click your "player" is frizzed, but mine is not, i can move mouse camera, i can move my "player".


Re: OnPlayerClickTextDraw problem - SilverStand - 06.01.2016

Try remove this on your OnPlayerClickTextDraw

Код:
TextDrawHideForPlayer(playerid, podloga7);



Re: OnPlayerClickTextDraw problem - MikkiMapper - 06.01.2016

Removed, but not helped..
Only what i think may be problem is : TextDrawSize, but i dont know how to fix that...


Re: OnPlayerClickTextDraw problem - MikkiMapper - 06.01.2016

So?


Re: OnPlayerClickTextDraw problem - MikkiMapper - 06.01.2016

Bump?