TD click doesn't work :/
#1

i solved my problem in last topic in fixing those fucking errors but i have some other problems now
here is what i scripted, it compiles successfully .when i join server, it shows the textdraws but the clickable textdraw doesn't work
textdraw6 is clickable one .

Код:
new PlayerText:Textdraw0[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:Textdraw1[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:Textdraw2[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:Textdraw3[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:Textdraw4[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:Textdraw5[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:Textdraw6[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:Textdraw7[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};

public OnPlayerConnect(playerid)
{

	Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 646.000, 1.500, "box");
	PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.000, 49.046);
	PlayerTextDrawTextSize(playerid, Textdraw0[playerid], -2.000, 0.000);
	PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
	PlayerTextDrawColor(playerid, Textdraw0[playerid], 12449279);
	PlayerTextDrawUseBox(playerid, Textdraw0[playerid], 1);
	PlayerTextDrawBoxColor(playerid, Textdraw0[playerid], 255);
	PlayerTextDrawBackgroundColor(playerid, Textdraw0[playerid], 102);
	PlayerTextDrawFont(playerid, Textdraw0[playerid], 1);

	Textdraw1[playerid] = CreatePlayerTextDraw(playerid, 643.000, 181.820, "box");
	PlayerTextDrawLetterSize(playerid, Textdraw1[playerid], 0.000, 3.825);
	PlayerTextDrawTextSize(playerid, Textdraw1[playerid], 9.500, 0.000);
	PlayerTextDrawAlignment(playerid, Textdraw1[playerid], 1);
	PlayerTextDrawColor(playerid, Textdraw1[playerid], 63);
	PlayerTextDrawUseBox(playerid, Textdraw1[playerid], 1);
	PlayerTextDrawBoxColor(playerid, Textdraw1[playerid], -33554669);
	PlayerTextDrawFont(playerid, Textdraw1[playerid], 0);

	Textdraw2[playerid] = CreatePlayerTextDraw(playerid, 32.000, 184.800, "RGP");
	PlayerTextDrawLetterSize(playerid, Textdraw2[playerid], 0.449, 1.600);
	PlayerTextDrawAlignment(playerid, Textdraw2[playerid], 1);
	PlayerTextDrawColor(playerid, Textdraw2[playerid], -1);
	PlayerTextDrawSetShadow(playerid, Textdraw2[playerid], -136);
	PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid], 51);
	PlayerTextDrawFont(playerid, Textdraw2[playerid], 2);
	PlayerTextDrawSetProportional(playerid, Textdraw2[playerid], 1);

	Textdraw3[playerid] = CreatePlayerTextDraw(playerid, 31.000, 199.360, "Stunt|Freeroam|DM");
	PlayerTextDrawLetterSize(playerid, Textdraw3[playerid], 0.342, 1.325);
	PlayerTextDrawTextSize(playerid, Textdraw3[playerid], -27.000, 1.120);
	PlayerTextDrawAlignment(playerid, Textdraw3[playerid], 1);
	PlayerTextDrawColor(playerid, Textdraw3[playerid], 5504903);
	PlayerTextDrawSetOutline(playerid, Textdraw3[playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, Textdraw3[playerid], 51);
	PlayerTextDrawFont(playerid, Textdraw3[playerid], 1);
	PlayerTextDrawSetProportional(playerid, Textdraw3[playerid], 1);

	Textdraw4[playerid] = CreatePlayerTextDraw(playerid, 68.500, 189.839, "v 3.0");
	PlayerTextDrawLetterSize(playerid, Textdraw4[playerid], 0.256, 1.034);
	PlayerTextDrawAlignment(playerid, Textdraw4[playerid], 1);
	PlayerTextDrawColor(playerid, Textdraw4[playerid], -726794241);
	PlayerTextDrawSetOutline(playerid, Textdraw4[playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, Textdraw4[playerid], 51);
	PlayerTextDrawFont(playerid, Textdraw4[playerid], 2);
	PlayerTextDrawSetProportional(playerid, Textdraw4[playerid], 1);

	Textdraw5[playerid] = CreatePlayerTextDraw(playerid, 264.000, 272.160, "click here to start playing:");
	PlayerTextDrawLetterSize(playerid, Textdraw5[playerid], 0.231, 1.044);
	PlayerTextDrawAlignment(playerid, Textdraw5[playerid], 1);
	PlayerTextDrawColor(playerid, Textdraw5[playerid], -1);
	PlayerTextDrawSetOutline(playerid, Textdraw5[playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, Textdraw5[playerid], 51);
	PlayerTextDrawFont(playerid, Textdraw5[playerid], 1);
	PlayerTextDrawSetProportional(playerid, Textdraw5[playerid], 1);

	Textdraw6[playerid] = CreatePlayerTextDraw(playerid, 286.500, 294.559, "Start");
	PlayerTextDrawLetterSize(playerid, Textdraw6[playerid], 0.449, 1.600);
	PlayerTextDrawTextSize(playerid, Textdraw6[playerid], 347.000, 8.399);
	PlayerTextDrawAlignment(playerid, Textdraw6[playerid], 1);
	PlayerTextDrawColor(playerid, Textdraw6[playerid], -1);
	PlayerTextDrawUseBox(playerid, Textdraw6[playerid], 1);
	PlayerTextDrawBoxColor(playerid, Textdraw6[playerid], 6553410);
	PlayerTextDrawSetOutline(playerid, Textdraw6[playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, Textdraw6[playerid], 51);
	PlayerTextDrawFont(playerid, Textdraw6[playerid], 2);
	PlayerTextDrawSetProportional(playerid, Textdraw6[playerid], 1);
 	PlayerTextDrawSetSelectable(playerid, Textdraw6[playerid], 1);

	Textdraw7[playerid] = CreatePlayerTextDraw(playerid, 215.000, 260.959, "Server is hosted,scripted and owned by R4VER.");
	PlayerTextDrawLetterSize(playerid, Textdraw7[playerid], 0.246, 0.955);
	PlayerTextDrawAlignment(playerid, Textdraw7[playerid], 1);
	PlayerTextDrawColor(playerid, Textdraw7[playerid], -1);
	PlayerTextDrawSetOutline(playerid, Textdraw7[playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, Textdraw7[playerid], 51);
	PlayerTextDrawFont(playerid, Textdraw7[playerid], 1);
	PlayerTextDrawSetProportional(playerid, Textdraw7[playerid], 1);
	
	PlayerTextDrawShow(playerid, Textdraw0[playerid]);
	PlayerTextDrawShow(playerid, Textdraw1[playerid]);
	PlayerTextDrawShow(playerid, Textdraw2[playerid]);
	PlayerTextDrawShow(playerid, Textdraw3[playerid]);
	PlayerTextDrawShow(playerid, Textdraw4[playerid]);
	PlayerTextDrawShow(playerid, Textdraw5[playerid]);
	PlayerTextDrawShow(playerid, Textdraw6[playerid]);
	PlayerTextDrawShow(playerid, Textdraw7[playerid]);
        return 1;
}

public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
	if(playertextid == Textdraw6[playerid])
  	{
		PlayerTextDrawDestroy(playerid, Textdraw0[playerid]);
		Textdraw0[playerid] = PlayerText:INVALID_TEXT_DRAW;

		PlayerTextDrawDestroy(playerid, Textdraw1[playerid]);
		Textdraw1[playerid] = PlayerText:INVALID_TEXT_DRAW;

		PlayerTextDrawDestroy(playerid, Textdraw2[playerid]);
		Textdraw2[playerid] = PlayerText:INVALID_TEXT_DRAW;

		PlayerTextDrawDestroy(playerid, Textdraw3[playerid]);
		Textdraw3[playerid] = PlayerText:INVALID_TEXT_DRAW;

		PlayerTextDrawDestroy(playerid, Textdraw4[playerid]);
		Textdraw4[playerid] = PlayerText:INVALID_TEXT_DRAW;

		PlayerTextDrawDestroy(playerid, Textdraw5[playerid]);
		Textdraw5[playerid] = PlayerText:INVALID_TEXT_DRAW;

		PlayerTextDrawDestroy(playerid, Textdraw6[playerid]);
		Textdraw6[playerid] = PlayerText:INVALID_TEXT_DRAW;

		PlayerTextDrawDestroy(playerid, Textdraw7[playerid]);
		Textdraw7[playerid] = PlayerText:INVALID_TEXT_DRAW;
		CancelSelectTextDraw(playerid);
	}
	return 1;
}
could somebody help me?
Reply


Messages In This Thread
TD click doesn't work :/ - by R4VER - 12.09.2012, 17:30
Re: TD click doesn't work :/ - by R4VER - 12.09.2012, 18:01
Re: TD click doesn't work :/ - by Admigo - 12.09.2012, 19:12
Re: TD click doesn't work :/ - by R4VER - 12.09.2012, 19:37

Forum Jump:


Users browsing this thread: 3 Guest(s)