[Help]: 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)
+--- Thread: [Help]: Dialogs (
/showthread.php?tid=332124)
[Help]: Dialogs -
Trawltrawl - 07.04.2012
Hello my friends, I'm just a newbie scripter.
I'd like a favor from you scripters.
-
So, I made my dialog, and I just wanted to make some effects on buttons, but I don't know how.
-
Much Appreciated
Thanks!
Re: [Help]: Dialogs -
DBan - 07.04.2012
Search is your friend
Re: [Help]: Dialogs -
Harish - 07.04.2012
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 1:// Our dialog!
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -1);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
}
case 1: // The second item listed
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -2);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
}
case 2: // The third item listed
{
if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -3);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
}
}
}
}
}
return 1;
}
do you need this and link
https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog
Re: [Help]: Dialogs -
spd_sahil - 07.04.2012
effects ? as far as ive scripted.. and seen i have never seen 'effects' on the buttons.. visual point of view
Re: [Help]: Dialogs -
TzAkS. - 07.04.2012
Effects,do you mean to do something when he click`s?
Try dialog creator,you can take it from my signature,is very helpfuly for newbie`s.
Re: [Help]: Dialogs -
Trawltrawl - 07.04.2012
Yeah, that's what i mean my friend.