Guys, My question is about Dialogs - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Guys, My question is about Dialogs (
/showthread.php?tid=266021)
Guys, My question is about Dialogs -
Ehab1911 - 03.07.2011
Hello guys, I don't understand those Dialogs as I searched the forum for a tutorial on them but couldn't find :S, So I came and posted this
I want to make a Dialog when you type /jobs
It shows for example the jobs and when you click on a job name you get a checkpoint to it
Like::
/jobs
MECHANIC
WHORE
SWEEPER
LAWYER
etc okay? I click now on Mechanic, I want it to show me the direction ( check point on the map ) to that job for example, and send me a client message saying for example Please follow the checkpoint on your radar to get that job.
Please help me, thanks in advance!
Re: Guys, My question is about Dialogs -
Lorenc_ - 03.07.2011
SetPlayerCheckPoint?
Re: Guys, My question is about Dialogs -
Ehab1911 - 03.07.2011
Yes but I want to understand how those " Dialogs " work please, if there is any thread you may found which I couldn't .. Please
Re: Guys, My question is about Dialogs -
Lorenc_ - 03.07.2011
There are plenty!
This will help you:
CLICK HERE
Re: Guys, My question is about Dialogs -
iPLEOMAX - 03.07.2011
On top of your script.
In OnPlayerCommandText:
pawn Код:
if(strcmp(cmd, "/jobs", true) == 0) {
ShowPlayerDialog(playerid, DIALOG_JOBS, DIALOG_STYLE_LIST,"Select your job:","1. Mechanic\n2.Whore\n3.Sweeper\n4.Lawyer","Select","Cancel");
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_JOBS:
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF,"You canceled the job selection");
return true;
}
switch(listitem)
{
case 0: {// Case 0 = Listitem 1.
//Your functions for Mechanic, like checkpoints, messages etc.
}
case 1: {
//Your functions for Whore
}
case 2: {
//YOur functions for Sweeper
}
case 3: {
//Your functions for Lawyer
}
}
}
}
return 1;
}
Untested, but this is how it should be done..
SA-MP Wiki and forum search will also help you a lot, as lorenc said.
Re: Guys, My question is about Dialogs -
Ehab1911 - 12.07.2011
Thanks a lot! But how can I put that Dialog, I have another one, which I took from an FS ,, How can I add that as another Dialog?