24.01.2019, 08:06
Hello guys,
i've created a PlayerTextDraw, but it isn't clickable.
This will be load
Then
maybe someone can help me.
i've created a PlayerTextDraw, but it isn't clickable.
Code:
stock Load_TD(playerid) { TD_Login[playerid][22] = CreatePlayerTextDraw(playerid, 317.333312, 226.918579, "Password"); PlayerTextDrawLetterSize(playerid, TD_Login[playerid][22], 0.281333, 1.877927); PlayerTextDrawTextSize(playerid, TD_Login[playerid][22], 0.000000, 73.000000); PlayerTextDrawAlignment(playerid, TD_Login[playerid][22], 2); PlayerTextDrawColor(playerid, TD_Login[playerid][22], -1); PlayerTextDrawUseBox(playerid, TD_Login[playerid][22], 1); PlayerTextDrawBoxColor(playerid, TD_Login[playerid][22], 171); PlayerTextDrawSetShadow(playerid, TD_Login[playerid][22], 0); PlayerTextDrawBackgroundColor(playerid, TD_Login[playerid][22], 255); PlayerTextDrawFont(playerid, TD_Login[playerid][22], 1); PlayerTextDrawSetProportional(playerid, TD_Login[playerid][22], 1); PlayerTextDrawSetSelectable(playerid, TD_Login[playerid][22], true); return 1; }
Code:
OnPlayerConnect(playerid) { for(new i = 0; i < 23; i++) { PlayerTextDrawShow(playerid, PlayerText:TD_Login[playerid][i]); } }
Code:
OnPlayerRequestClass(playerid, classid) { SelectTextDraw(playerid, 0xFF4040AA); }
Code:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) { if(_:playertextid != INVALID_TEXT_DRAW) { if(playertextid == TD_Login[playerid][22]) { SendClientMessage(playerid, COLOR_GREEN, "yes"); } } else { SendClientMessage(playerid, COLOR_GREEN, "no"); } return 1; }