Dialog problems
#2

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:

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(playeridDIALOG_ALERTDIALOG_STYLE_MSGBOX"Message"sel"""Continue");
        
SaveStateCar(carid);
    }

Greekz
Reply


Messages In This Thread
Dialog problems - by HidroDF - 31.08.2016, 17:31
Re: Dialog problems - by Kaliber - 31.08.2016, 18:06
Respuesta: Dialog problems - by HidroDF - 31.08.2016, 18:11
Re: Dialog problems - by Kaliber - 31.08.2016, 18:25

Forum Jump:


Users browsing this thread: 1 Guest(s)