Help with dialog - 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: Help with dialog (
/showthread.php?tid=137551)
Help with dialog -
Ben147 - 29.03.2010
I maded list of dialog and my question is how can i add a command to player if he clicked on the itemlist 0
something like this:
Код:
if(dialogid == 147147)
{
if(response)
{
if(listitem == 0)
{
return /v buy 473
}
}
else{SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!");}
}
Re: Help with dialog -
jamesbond007 - 29.03.2010
i dont know just put the function in the command to here and dialog id cannot be that high
Re: Help with dialog -
Ben147 - 29.03.2010
the dialog id works perfectly.. and i have already the /v buy command...
just watch the return..
im just trying to automatic write to player command when he choose one for the list in dialog
Re: Help with dialog -
jamesbond007 - 29.03.2010
i noticed, but its not gonna work like that meybe try
Код:
if(dialogid == 147147)
{
if(response)
{
if(listitem == 0)
{
//put your /v command function here
}
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!");
}
return 1;
}
thats the only way i know and i indented it alittle for you lulz
Re: Help with dialog -
biltong - 29.03.2010
I don't think you can if you're using OnPlayerCommandText and strcmp, I think it's only possible with dcmd and zcmd. You could also make a custom function with all your /v buy code, and then use that as a function under your dialog and strcmp.