11.07.2010, 09:56
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):
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)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Kk Now Time For The Response:
Type This:
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
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");
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(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!
!^.^!
GOT A QUESTION?
ASK AND ILL ANSWER!
!^.^!