Detecting spaces in dialogs (inputtext)
#8

Quote:
Originally Posted by Rajat_Pawar
Посмотреть сообщение
Something like..this? Would it work?
pawn Код:
new Float:x, Float:y, Float:z;
sscanf(inputtext,"fff",x,y,z);
I sincerely hope it's not truly that easy.

EDIT: in case anyone was wondering, I got it working.

pawn Код:
case DIALOG_GOTOPOS:
{
        if ( response )
        {
                if( strcmp ( inputtext, "immigration", false ) == 0 )
                {
                        SetPlayerPos ( playerid, 1489.1519, -1145.5687, 24.0781 );
                        SetPlayerFacingAngle ( playerid, 91.3527 );
                }
                else
                {
                        new
                                Float: xpos,
                                Float: ypos,
                                Float: zpos;
                               
                        if( !sscanf( inputtext, "p<,>fff", xpos, ypos, zpos ) )
                        {
                                SetPlayerPos ( playerid, xpos, ypos, zpos );
                        }
                }
        }
}
Pretty simple, actually.
Reply


Messages In This Thread
Detecting spaces in dialogs (inputtext) - by 2KY - 16.02.2013, 01:48
Re: Detecting spaces in dialogs (inputtext) - by Luis- - 16.02.2013, 01:52
Re: Detecting spaces in dialogs (inputtext) - by 2KY - 16.02.2013, 01:54
Re: Detecting spaces in dialogs (inputtext) - by Luis- - 16.02.2013, 02:03
Re: Detecting spaces in dialogs (inputtext) - by SchurmanCQC - 16.02.2013, 02:07
Re: Detecting spaces in dialogs (inputtext) - by 2KY - 16.02.2013, 02:09
Re: Detecting spaces in dialogs (inputtext) - by RajatPawar - 16.02.2013, 02:13
Re: Detecting spaces in dialogs (inputtext) - by 2KY - 16.02.2013, 02:14

Forum Jump:


Users browsing this thread: 4 Guest(s)