new PlayerText: TD_Register[14][MAX_PLAYERS];
PlayerTextDrawShow(playerid, TD_Register[14][playerid]);
PlayerTextDrawSetSelectable(playerid, TD_Register[14][playerid], 1);
//******************************************************
TD_Register[14][playerid] = CreatePlayerTextDraw(playerid, 605.599670, 183.679946, "LD_BEAT:LEFT");
PlayerTextDrawLetterSize(playerid, TD_Register[14][playerid], 0.063997, -0.664533);
PlayerTextDrawTextSize(playerid, TD_Register[14][playerid], -9.600008, 8.213315);
PlayerTextDrawAlignment(playerid, TD_Register[14][playerid], 1);
PlayerTextDrawColor(playerid, TD_Register[14][playerid], -1);
PlayerTextDrawSetShadow(playerid, TD_Register[14][playerid], 0);
PlayerTextDrawSetOutline(playerid, TD_Register[14][playerid], 0);
PlayerTextDrawFont(playerid, TD_Register[14][playerid], 4);
PlayerTextDrawSetSelectable(playerid, TD_Register[14][playerid], 1);
//**********************************************************
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == TD_Register[14][playerid])
{
if(selval[0][playerid] == 0)
{
selval[0][playerid] = 1;
PlayerTextDrawSetString(playerid, TD_Register[6][playerid], "Male");
}
else if(selval[0][playerid] == 1)
{
selval[0][playerid] = 0;
PlayerTextDrawSetString(playerid, TD_Register[6][playerid], "Female");
}
}
return 1;
}
PlayerTextDrawTextSize(playerid, TD_Register[14][playerid], -9.600008, 8.213315);
PlayerTextDrawTextSize(playerid, TD_Register[14][playerid], 50.600008, 8.213315);
Np mate, I got a lil suggestion for you in the future.
Create invisible boxes around your clickable textdraws so you can preety much know at all times where and what. |