Inputtext, textdraws, dialog, real problem. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Inputtext, textdraws, dialog, real problem. (
/showthread.php?tid=656272)
Inputtext, textdraws, dialog, real problem. -
Inuro - 11.07.2018
Hi.
I actually very need your help because i've made a script using textdraws where the player have to click on "Age" to edit the textdraw like :
"Age : 21"
21 is the value chosen by the player with the dialog but, the textdraw is not updated when the player chooses his age. There is my code:
THE DIALOG
Quote:
if(dialogid == DIALOG_AGE)
{
format(InscriAge, sizeof(InscriAge), "%d", inputtext);
format(MessageInscri, sizeof(MessageInscri), "Age: %d", InscriAge);
PlayerTextDrawSetString(playerid, Creationperso[playerid][11], MessageInscri);
PlayerTextDrawShow(playerid, Creationperso[playerid][11]);
}
|
OnPlayerClickPlayerTextDraw
Quote:
if(playertextid == Creationperso[playerid][11])
{
PlayerTextDrawHide(playerid, Creationperso[playerid][11]);
ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age perso", "Age du perso", "Choisir", "");
}
|
Re: Inputtext, textdraws, dialog, real problem. -
ItsRobinson - 11.07.2018
PHP Code:
if(dialogid == DIALOG_AGE)
{
new age = strval(inputtext);
format(MessageInscri, sizeof(MessageInscri), "Age: %d", age);
PlayerTextDrawSetString(playerid, Creationperso[playerid][11], MessageInscri);
PlayerTextDrawShow(playerid, Creationperso[playerid][11]);
}
Re: Inputtext, textdraws, dialog, real problem. -
Inuro - 11.07.2018
thanks you man