PlayerTextDraw: Expression has no effect
#5

Oukey, Thanks for Answers. It seems my Gamemode fault. Or better if i say, my fault. I'm trying to make a Clickable Textdraw bow, with text/buttons inside.. Any ideas, to get that work? Trying to make a Menu Page Hola, and second Pages Hola_TR, Hola_ZP, Hola_MF. If i click on Hola_TR need to hide the Hola menu page, and open the Hola_TR page for example. If someone have time, to look over, i would be Thank full. I'm new with all of it. Need to get the Experiance. Tried to solve by myself, but cause more bugs, than it should.

Quote:

new IsHolaOpen[MAX_PLAYERS] = 0;
new PlayerText:Hola[MAX_PLAYERS][13];
new PlayerText:Hola_TR[MAX_PLAYERS][15];
new PlayerText:Hola_ZP[MAX_PLAYERS][15];
new PlayerText:Hola_MF[MAX_PLAYERS][13];

public OnPlayerConnect(playerid)
{
Hola[playerid][0] = CreatePlayerTextDraw(playerid, 327.700134, 126.533325, "box");
PlayerTextDrawLetterSize(playerid, Hola[playerid][0], 0.000000, 25.688150);
PlayerTextDrawTextSize(playerid, Hola[playerid][0], 0.000000, 513.000000);
PlayerTextDrawAlignment(playerid, Hola[playerid][0], 2);
PlayerTextDrawColor(playerid, Hola[playerid][0], -1);
PlayerTextDrawUseBox(playerid, Hola[playerid][0], 1);
PlayerTextDrawBoxColor(playerid, Hola[playerid][0], -2139062017);
PlayerTextDrawSetShadow(playerid, Hola[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, Hola[playerid][0], 0);
PlayerTextDrawBackgroundColor(playerid, Hola[playerid][0], 255);
PlayerTextDrawFont(playerid, Hola[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, Hola[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, Hola[playerid][0], 0);
..12 more of Hola Textdraw's

Hola_TR[playerid][0] = CreatePlayerTextDraw(playerid, 327.700134, 126.533325, "box");
PlayerTextDrawLetterSize(playerid, Hola_TR[playerid][0], 0.000000, 25.688150);
PlayerTextDrawTextSize(playerid, Hola_TR[playerid][0], 0.000000, 513.000000);
PlayerTextDrawAlignment(playerid, Hola_TR[playerid][0], 2);
PlayerTextDrawColor(playerid, Hola_TR[playerid][0], -1);
PlayerTextDrawUseBox(playerid, Hola_TR[playerid][0], 1);
PlayerTextDrawBoxColor(playerid, Hola_TR[playerid][0], -2139062017);
PlayerTextDrawSetShadow(playerid, Hola_TR[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, Hola_TR[playerid][0], 0);
PlayerTextDrawBackgroundColor(playerid, Hola_TR[playerid][0], 255);
PlayerTextDrawFont(playerid, Hola_TR[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, Hola_TR[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, Hola_TR[playerid][0], 0);
..14 more of Hola_TR Textdraw's

Hola_ZP[playerid][0] = CreatePlayerTextDraw(playerid, 327.700134, 126.533325, "box");
PlayerTextDrawLetterSize(playerid, Hola_ZP[playerid][0], 0.000000, 25.688150);
PlayerTextDrawTextSize(playerid, Hola_ZP[playerid][0], 0.000000, 513.000000);
PlayerTextDrawAlignment(playerid, Hola_ZP[playerid][0], 2);
PlayerTextDrawColor(playerid, Hola_ZP[playerid][0], -1);
PlayerTextDrawUseBox(playerid, Hola_ZP[playerid][0], 1);
PlayerTextDrawBoxColor(playerid, Hola_ZP[playerid][0], -2139062017);
PlayerTextDrawSetShadow(playerid, Hola_ZP[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, Hola_ZP[playerid][0], 0);
PlayerTextDrawBackgroundColor(playerid, Hola_ZP[playerid][0], 255);
PlayerTextDrawFont(playerid, Hola_ZP[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, Hola_ZP[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, Hola_ZP[playerid][0], 0);
..14 more of Hola_ZP Textdraw's

Hola_MF[playerid][0] = CreatePlayerTextDraw(playerid, 327.700134, 126.533325, "box");
PlayerTextDrawLetterSize(playerid, Hola_MF[playerid][0], 0.000000, 25.688150);
PlayerTextDrawTextSize(playerid, Hola_MF[playerid][0], 0.000000, 513.000000);
PlayerTextDrawAlignment(playerid, Hola_MF[playerid][0], 2);
PlayerTextDrawColor(playerid, Hola_MF[playerid][0], -1);
PlayerTextDrawUseBox(playerid, Hola_MF[playerid][0], 1);
PlayerTextDrawBoxColor(playerid, Hola_MF[playerid][0], -2139062017);
PlayerTextDrawSetShadow(playerid, Hola_MF[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, Hola_MF[playerid][0], 0);
PlayerTextDrawBackgroundColor(playerid, Hola_MF[playerid][0], 255);
PlayerTextDrawFont(playerid, Hola_MF[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, Hola_MF[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, Hola_MF[playerid][0], 0);
..12 more of Hola_ZP Textdraw's

... other code
}

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid != 1)
{
if(clickedid == Hola[4])
{
for(new i; i < 13; i++)
PlayerTextDrawHide(playerid,Hola[i]);
for(new x; x < 15; x++)
PlayerTextDrawShow(playerid,Hola_TR[x]);
}
else if(clickedid == Hola[5])
{
for(new i; i < 13; i++)
PlayerTextDrawHide(playerid,Hola[i]);
for(new b; b < 15; b++)
PlayerTextDrawShow(playerid,Hola_ZP[b]);
}
else if(clickedid == Hola[9])
{
for(new i; i < 13; i++)
PlayerTextDrawHide(playerid,Hola[i]);
for(new m; m < 13; m++)
PlayerTextDrawShow(playerid,Hola_ZP[m]);
}
else if(clickedid == Hola[6])
{
for(new i; i < 13; i++)
PlayerTextDrawHide(playerid,Hola[i]);
for(new m; m < 13; m++)
PlayerTextDrawShow(playerid,Hola_MF[m]);
}
for(new i; i < 13; i++)PlayerTextDrawHide(playerid,Hola[i]);
for(new x; x < 15; x++)PlayerTextDrawHide(playerid,Hola_TR[x]);
for(new b; b < 15; b++)PlayerTextDrawHide(playerid,Hola_ZP[b]);
for(new m; m < 13; m++)PlayerTextDrawHide(playerid,Hola_MF[m]);
CancelSelectTextDraw(playerid);
}
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{

if (!strcmp("/hola", cmdtext, true))
{
if(!(playerDB[playerid][job] == 1 || playerDB[playerid][job] == )
{
SendClientMessage(playerid,0xAA3333AA,"Get a job!.");
return 1;
}

if(IsHolaOpen[playerid] == 0)
{
for(new i; i < 13; i++)PlayerTextDrawShow(playerid,Hola[i]);
SelectTextDraw(playerid, 0xA3B4C5FF);
IsHolaOpen[playerid] = 1;
return 1;
}
else if(IsPdbOpen[playerid] == 1)
{
for(new i; i < 13; i++)PlayerTextDrawHide(playerid,Hola[i]);
IsHolaOpen[playerid] = 0;
return 1;
}
return 1;
}
}

public OnPlayerDeath(playerid, killerid, reason)
{
if(IsHolaOpen[playerid] == 1)
{
for(new i; i < 13; i++)PlayerTextDrawHide(playerid,Hola[i]);
for(new x; x < 15; x++)PlayerTextDrawHide(playerid,Hola_TR[x]);
for(new b; b < 15; b++)PlayerTextDrawHide(playerid,Hola_ZP[b]);
for(new m; m < 13; m++)PlayerTextDrawHide(playerid,Hola_MF[m]);
IsHolaOpen[playerid] = 0;
return 1;
}
}

Reply


Messages In This Thread
PlayerTextDraw: Expression has no effect - by NBass - 25.03.2017, 20:09
Re: PlayerTextDraw: Expression has no effect - by jlalt - 25.03.2017, 20:17
Re: PlayerTextDraw: Expression has no effect - by NBass - 25.03.2017, 20:21
Re: PlayerTextDraw: Expression has no effect - by DobbysGamertag - 25.03.2017, 20:26
Re: PlayerTextDraw: Expression has no effect - by NBass - 25.03.2017, 21:15

Forum Jump:


Users browsing this thread: 1 Guest(s)