02.09.2016, 12:31
Hi guys, why when I use the function PlayerTextDrawSetString, the TD don't change a value of string?
This is a Dialog
This is a callback OnPlayerClickPlayerTextDraw
The TD is canceled while I want thar when the user click on TD name and writes his name on the dialog, the TD takes the string name that fits the dialog
This is a TD in OnPlayerConnect
This is a Dialog
Код HTML:
case DIALOG_NOME: { if(!response) return SCM(playerid, INFO, "* {FFFFFF}Scelta annullata"); if(response) { new str[15]; format(str,sizeof(str),"%s", strval(inputtext)); PlayerTextDrawSetString(playerid, TextNomeRegistrazione[playerid], str); PlayerTextDrawShow(playerid, TextNomeRegistrazione[playerid]); PlayerInfo[playerid][pNome] = str; return 1; } }
Код HTML:
if(playertextid == TextNomeRegistrazione[playerid]) { PlayerTextDrawHide(playerid, TextNomeRegistrazione[playerid]); SPD(playerid, DIALOG_NOME, DSI, inizio" Inserisci il tuo nome", "Come ti chiami? (Digita solo il tuo nome)","Vai","Annulla"); }
This is a TD in OnPlayerConnect
Код HTML:
TextNomeRegistrazione[playerid] = CreatePlayerTextDraw(playerid, 113.850646, 133.583312, "Nome"); PlayerTextDrawLetterSize(playerid, TextNomeRegistrazione[playerid], 0.452811, 1.600000); PlayerTextDrawTextSize(playerid, TextNomeRegistrazione[playerid], 218.330856, 52.499988); PlayerTextDrawAlignment(playerid, TextNomeRegistrazione[playerid], 1); PlayerTextDrawColor(playerid, TextNomeRegistrazione[playerid], -1378294017); PlayerTextDrawSetShadow(playerid, TextNomeRegistrazione[playerid], 0); PlayerTextDrawSetOutline(playerid, TextNomeRegistrazione[playerid], 1); PlayerTextDrawBackgroundColor(playerid, TextNomeRegistrazione[playerid], 255); PlayerTextDrawFont(playerid, TextNomeRegistrazione[playerid], 2); PlayerTextDrawSetProportional(playerid, TextNomeRegistrazione[playerid], 1); PlayerTextDrawSetSelectable(playerid, TextNomeRegistrazione[playerid], true); PlayerTextDrawTextSize(playerid, TextNomeRegistrazione[playerid], 300,20);