How to check if there's a number in a string and get that number as a variable
#1

Hi guys,
my problem is that i want to use a function that checks if there's a number inside a string
and i want that number to be stored in a variable so i can use it later but i couldn't do that

here's my code
pawn Код:
format(string, sizeof(string), "%s - ID: %d\n", VehicleName[vModel - 400], v);
ShowPlayerDialog(playerid, vehiclename, DIALOG_STYLE_LIST, "my vehicles", string, "Select", "");
then, in OnDialogResponse, i want to get that integer "ID: %d" but how?

pawn Код:
//OnDialogResponse
case vehiclename:
        {
            if(!response) return 0;
            else
            {
                //i wanna get the integer "ID: %d" here from listitem or something
            }
        }
I need help
thanks in advance !
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)