31.08.2016, 18:06
In the string "inputtext" is the string he clicked to.
So if there is "Infernus (0) - bla - bla"
You need this number in brackets...so write a string splitter to get the id:
So you do this:
Greekz
So if there is "Infernus (0) - bla - bla"
You need this number in brackets...so write a string splitter to get the id:
So you do this:
PHP код:
if (dialogid == DIALOG_CARS)
{
if(response)
{
new sel[300],tmp[5],id;
strmid(tmp,inputtext,strfind(inputtext,"(")+1,strfind(inputtext,")"),sizeof(tmp));
id = strval(tmp);
format(sel,sizeof(sel),"{FFFFFF}You have selected the CARID: {40D3FF}%d.",id);
ShowPlayerDialog(playerid, DIALOG_ALERT, DIALOG_STYLE_MSGBOX, "Message", sel, "", "Continue");
SaveStateCar(carid);
}
}