Problem With Selectable Textdraw
#1

Код:
public OnPlayerConnect(playerid)
{
	engine = TextDrawCreate(514.400329, 205.333312, "Turn On Engine");
	TextDrawLetterSize(engine, 0.449999, 1.600000);
	TextDrawAlignment(engine, 1);
	TextDrawColor(engine, -1);
	TextDrawSetShadow(engine, 0);
	TextDrawSetOutline(engine, 1);
	TextDrawBackgroundColor(engine, 51);
	TextDrawFont(engine, 1);
	TextDrawSetProportional(engine, 1);
	PlayerTextDrawSetSelectable(playerid, engine, true);
	return 1;
}
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
		new vID=GetPlayerVehicleID(playerid);
      	        TextDrawShowForPlayer(playerid, engine);
  		PlayerTextDrawSetSelectable(playerid, engine, true);
     }
}
but it is not selectable :/
Reply
#2

Quote:
Originally Posted by akib
Посмотреть сообщение
Код:
public OnPlayerConnect(playerid)
{
	engine = TextDrawCreate(514.400329, 205.333312, "Turn On Engine");
	TextDrawLetterSize(engine, 0.449999, 1.600000);
	TextDrawAlignment(engine, 1);
	TextDrawColor(engine, -1);
	TextDrawSetShadow(engine, 0);
	TextDrawSetOutline(engine, 1);
	TextDrawBackgroundColor(engine, 51);
	TextDrawFont(engine, 1);
	TextDrawSetProportional(engine, 1);
	PlayerTextDrawSetSelectable(playerid, engine, true);
	return 1;
}
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
		new vID=GetPlayerVehicleID(playerid);
      	        TextDrawShowForPlayer(playerid, engine);
  		PlayerTextDrawSetSelectable(playerid, engine, true);
     }
}
but it is not selectable :/
It is not selectable becouse you haven`t enabled textdraw box and give size to that box which you will enable.
Reply
#3

Quote:
Originally Posted by Sanady
Посмотреть сообщение
It is not selectable becouse you haven`t enabled textdraw box and give size to that box which you will enable.
plz give me solution
Reply
#4

Quote:
Originally Posted by akib
Посмотреть сообщение
plz give me solution
I gave you solution how to fix it, create box inside of that textdraw and make size of box same as a text that`s all.
Reply
#5

Quote:
Originally Posted by Sanady
Посмотреть сообщение
I gave you solution how to fix it, create box inside of that textdraw and make size of box same as a text that`s all.
Fixed! THanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)