10.02.2013, 07:30
pawn Код:
new PlayerText:Textdraw0[MAX_PLAYERS];
new PlayerText:Textdraw1[MAX_PLAYERS];
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 277.021942, 161.333343, "usebox");
PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.000000, 2.729628);
PlayerTextDrawTextSize(playerid, Textdraw0[playerid], 240.694000, 0.000000);
PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw0[playerid], 0);
PlayerTextDrawUseBox(playerid, Textdraw0[playerid], true);
PlayerTextDrawBoxColor(playerid, Textdraw0[playerid], -256);
PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 0);
PlayerTextDrawBackgroundColor(playerid, Textdraw0[playerid], -256);
PlayerTextDrawFont(playerid, Textdraw0[playerid], 0);
Textdraw1[playerid] = CreatePlayerTextDraw(playerid, 396.494873, 161.333343, "usebox");
PlayerTextDrawLetterSize(playerid, Textdraw1[playerid], 0.000000, 3.053700);
PlayerTextDrawTextSize(playerid, Textdraw1[playerid], 356.418731, 0.000000);
PlayerTextDrawAlignment(playerid, Textdraw1[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw1[playerid], 0);
PlayerTextDrawUseBox(playerid, Textdraw1[playerid], true);
PlayerTextDrawBoxColor(playerid, Textdraw1[playerid], -256);
PlayerTextDrawSetShadow(playerid, Textdraw1[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw1[playerid], 0);
PlayerTextDrawFont(playerid, Textdraw1[playerid], 0);
print("TD CREATED");
PlayerTextDrawShow(playerid, Textdraw0[playerid]);
PlayerTextDrawShow(playerid, Textdraw1[playerid]);
SendClientMessage(playerid, COLOR_GREEN, "TDs shown..");
new stz[128];
format(stz,128,"%d, %d.",Likes[clickedplayerid],Dislikes[clickedplayerid]);
SendClientMessage(playerid, COLOR_GREY, stz);
return 1;
}
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
print("Test callback");
if(playertextid == Textdraw0[playerid])
{
SendClientMessage(playerid, COLOR_GREEN, "Thanks bla!");
Test[d]++;
// PlayerTextDrawHide(playerid, Textdraw0[playerid]);
// PlayerTextDrawHide(playerid, Textdraw1[playerid]);
print("Test 2");
}
if(playertextid == Textdraw1[playerid])
{
SendClientMessage(playerid, COLOR_GREEN, "Thanks bla!");
Test1[d]++;
PlayerTextDrawHide(playerid, Textdraw0[playerid]);
PlayerTextDrawHide(playerid, Textdraw1[playerid]);
print("Test 1");
}
return 1;
}
Please do help. I am a bit frustrated.