Get Textdraw Text String?
#1

How do i get a textdraw text string, so i can save its information in INI, like now i have an AGE textdraw, and i want like the number that the player chooses would be saved in his INI file after he clicks the textdraw "Next"

Someone help please, its urgent.
Reply
#2

are you really talking about a textdraw? or do you mean a dialog?
Reply
#3

Yes i'm talking about a textdraw like Age Selection textdraw, i want so that after a player chooses a number from that textdraw when they click next that number would be saved as their age
Reply
#4

Here's some filterscripts that does this, you can take a look at them.
https://sampforum.blast.hk/showthread.php?tid=535968
https://sampforum.blast.hk/showthread.php?tid=536926
https://sampforum.blast.hk/showthread.php?tid=517343
https://sampforum.blast.hk/showthread.php?tid=376758
Reply
#5

They aren't doing what im trying to do, i'm using strings with the textdraw to create the age selections its functioning fine, but idk how to save that textdraw string to be the PlayerInfo[playerid][pAge] == %d
Reply
#6

The second one saves the inputtext from the textdraws, you can just look into how it saves it, and change to "pAge".
Reply
#7

Yeah an inputtext from a dialog, i want the integers from the textdraw im not using dialogs, im using just textdraws, ik how to do the inputtext one using the dialogs, what im trying to do is to save the number that a player chooses on the textdraw, something like this, but only the age selections, i re-done this, and made a new one myself so it can be only the age selection, now after im done with the textdraws and its functioning how can i make it so when the players clicks the next button the script would get the text from the age textdraw and save it as his pAge

https://sampforum.blast.hk/showthread.php?tid=529012
Reply
#8

This is the code for the selection age

pawn Код:
if(playertextid == TD_Regis[13][playerid])
    {
        selval[1][playerid] ++;

        format(string, sizeof(string), "%d", selval[1][playerid]);

        if(selval[1][playerid] >= 80)
        {
            selval[1][playerid] = 12;
        }
Can i do it like that?

pawn Код:
format(string, sizeof(string), "%d", selval[1][playerid]);

        if(selval[1][playerid] <= 18) return PlayerInfo[playerid][pAge] = selval[1];  // This line
        {
            selval[1][playerid] = 81;
        }

        PlayerTextDrawSetString(playerid, TDEditor_PTD[5][playerid], string);
Reply
#9

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)