Can someone tell me what is wrong with this? - 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: Can someone tell me what is wrong with this? (
/showthread.php?tid=512215)
Can someone tell me what is wrong with this? -
luckie12 - 09.05.2014
Hi everybody!
I have a problem in a FS that i made a year ago, it worked then but now the Dialog shows up but wont show the selected items. my script:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 55, COLOR_GREEN_EMBED "Loading helplist...");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it you need help with?", "Rules\nTarget of server\nIDK", "Select", "Cancel");
return 1;
}
return 0;
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Server Rules", "1)No Swearing! Results kick/ban\n2)No Truck blocking! Results kick!", "Ok", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Target of server", "The target of this server is to deliver the items\nto the red markers @ a fabric/store!", "Ok", "Cancel");
}
case 2:
{
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;
}
Does someone sees the problem?
Thanks -Luckie12
Re: Can someone tell me what is wrong with this? -
luckie12 - 09.05.2014
Still not working :/
Re: Can someone tell me what is wrong with this? -
Eth - 09.05.2014
change the dialog id to something else.