OnPlayerClickTextDraw problem
#1

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;
}
Reply
#2

Help?
Reply
#3

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
Reply
#4

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
Reply
#5

Read this
Reply
#6

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".
Reply
#7

Try remove this on your OnPlayerClickTextDraw

Код:
TextDrawHideForPlayer(playerid, podloga7);
Reply
#8

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

So?
Reply
#10

Bump?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)