[Tutorial] [TUT]How to Create A INPUT Dialog
#1

Hey I'm IanDaCJ And In This I'll Be Showing You How To Make A Input dialog

Kk First Of all Find A Callback Where You Will Use this [For Example: OnCommandText]
And Type This(for Example):
pawn Код:
ShowPlayerDialog(playerid,67,DIALOG_STYLE_INPUT,"Teleports","Place\t\tID\nLs Airport\t1\nLv Airport\t2","Choose","Close");
ShowPlayerDialog Shows The Dialog

playerid To the Certian Player

67 Its Just ID For The Response (You Can Replace This With Any Number) It Doesnt Matter Which ID It Is It Only Matters Like If Ur Using a List / Input Or A MSGBOX Dialog You Have To Match The ID.

DIALOG_STYLE_INPUT The Style Of the Dialog Can Be Seen Here

"Teleports" Its Just The Title Of The Dialog Like The Word "Caption" In this PICTURE

Now the Text To Be Shown In the Box (mostly used for info) U Can Type Anything like.. "Lv Airport" Or Like "Ls Airport" Well anything that u want.. Now U Can See I Did [Name] And [ID] ITs Just For General Info.. The [Name] Is What Its About And The [ID] Is what Number You Have To Enter To go/ Get That Certian Place / Item.
[PS: \t Is For Long Lines , \n Is For A New Line]

"Choose" The Accept Button (Left)

"Close" The Decline Button (Right)

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ONDIALOGRESPONSE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Kk Now Time For The Response:
Type This:
pawn Код:
if(dialogid == 67 && response == 1)
{
    if(inputtext[0] == '1') {
        SetPlayerPos(playerid, 2090.8916,-2545.3416,13.5469);
        SendClientMessage(playerid,0xAA3333AA,"You Teleported LS Airport");
    }
    else if(inputtext[0] == '2') {
        SetPlayerPos(playerid, 1481.1478,1229.8453,10.8203);
        SendClientMessage(playerid,0xAA3333AA,"You Teleported To LV Airport");
        }
        return 1;
    }
return 0;
}
if(dialogid == 67 && response == 1) It Responses The Dialog ID (as i described Earlier)

if(inputtext[0] == '1') { IF Someone types In 1 IT Does This / These Certian Command(s)
SendClientMessage(playerid... IT will Show A client Message (A Msg IN The ChatBox To You)
SetPlayerPos(playerid... IT will Set The Player To this Certian Position

else if(inputtext[0] == '2') { IF Someone Types In 2 IT Does This / These Certian Command(s)
SendClientMessage(playerid... IT will Show A client Message (A Msg IN The ChatBox To You)
SetPlayerPos(playerid... IT will Set The Player To this Certian Position

HOPE THIS HELPS!!!
GOT A QUESTION?
ASK AND ILL ANSWER!
!^.^!
Reply


Messages In This Thread
[TUT]How to Create A INPUT Dialog - by IanDaCJ - 11.07.2010, 09:56
Re: [TUT]How to Create A INPUT Dialog - by hab2ever - 11.07.2010, 09:59
Re: [TUT]How to Create A INPUT Dialog - by CAR - 11.07.2010, 10:33
Re: [TUT]How to Create A INPUT Dialog - by Hiddos - 11.07.2010, 10:34
Re: [TUT]How to Create A INPUT Dialog - by tanush - 12.07.2010, 20:57
Re: [TUT]How to Create A INPUT Dialog - by Aleluja - 12.07.2010, 21:18
Re: [TUT]How to Create A INPUT Dialog - by ToPhrESH - 12.07.2010, 21:44
Re: [TUT]How to Create A INPUT Dialog - by Aleluja - 13.07.2010, 11:45
Re: [TUT]How to Create A INPUT Dialog - by tanush - 13.07.2010, 16:34
Re: [TUT]How to Create A INPUT Dialog - by felipex - 13.07.2010, 18:31
Re: [TUT]How to Create A INPUT Dialog - by felipex - 13.07.2010, 18:34
Re: [TUT]How to Create A INPUT Dialog - by IanDaCJ - 13.07.2010, 20:08
Re: [TUT]How to Create A INPUT Dialog - by tanush - 15.07.2010, 01:29
Re: [TUT]How to Create A INPUT Dialog - by Brian_Furious - 20.07.2010, 09:47
Re: [TUT]How to Create A INPUT Dialog - by Jochemd - 23.07.2010, 09:11
Re: [TUT]How to Create A INPUT Dialog - by [DK]JaloNik - 23.07.2010, 09:27
Re: [TUT]How to Create A INPUT Dialog - by Creation - 02.09.2010, 20:02
Re: [TUT]How to Create A INPUT Dialog - by Luis- - 02.09.2010, 21:44
Re: [TUT]How to Create A INPUT Dialog - by Victos_xd - 05.08.2011, 16:08
Re: [TUT]How to Create A INPUT Dialog - by Tom Kingston - 09.03.2013, 16:56
Re: [TUT]How to Create A INPUT Dialog - by Mr.Valdez - 14.03.2013, 19:25
Re: [TUT]How to Create A INPUT Dialog - by CROSS_Hunter - 03.05.2013, 02:03
Re: [TUT]How to Create A INPUT Dialog - by Pettersen - 18.05.2013, 17:39
Re: [TUT]How to Create A INPUT Dialog - by SwisherSweet - 02.06.2013, 21:01

Forum Jump:


Users browsing this thread: 1 Guest(s)