Tudom, van már egy ilyen téma de ez teljesen más...
az volna a problémám hogy van egyszer egy ilyen dialogom:
{
if (pickupid==wshop)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, \"What is it that you want?\", \"Desert Eagle (750$) \\nAK47 (2250$) \\nM4(2500$) \\nGolf Club (50$) \\nSawn-off Shotgun (1800$) \\nTec9 (1500$)\", \"Purchase\", \"Cancel\");
}
Response pedig:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
{
switch(dialogid, 1)// 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 Desert Eagle
{
if(GetPlayerMoney(playerid) < 750) return SendClientMessage(playerid, 0xAA3333AA, \"You don\'t have enough cash.\");
GivePlayerMoney(playerid, -750);
GivePlayerWeapon(playerid, 24, 500);
}
case 1: // The AK47
{
if(GetPlayerMoney(playerid) < 2250) return SendClientMessage(playerid, 0xAA3333AA, \"You don\'t have enough cash.\");
GivePlayerMoney(playerid, -2250);
GivePlayerWeapon(playerid, 30, 750);
}
case 2: // The M4
{
if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid, 0xAA3333AA, \"You don\'t have enough cash.\");
GivePlayerMoney(playerid, -2500);
GivePlayerWeapon(playerid, 31, 750);
}
case 3: // The Golf Club
{
if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xAA3333AA, \"You don\'t have enough cash.\");
GivePlayerMoney(playerid, -50);
GivePlayerWeapon(playerid, 2, 0);
}
case 4: // The Sawn-off
{
if(GetPlayerMoney(playerid) < 1800) return SendClientMessage(playerid, 0xAA3333AA, \"You don\'t have enough cash.\");
GivePlayerMoney(playerid, -1800);
GivePlayerWeapon(playerid, 26, 400);
}
case 5: // The Tec9
{
if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, 0xAA3333AA, \"You don\'t have enough cash.\");
GivePlayerMoney(playerid, -1500);
GivePlayerWeapon(playerid, 32, 800);
}
}
}
}
}
return 1;
}
Ezek a game mode-ban vannak benne
Írnék egy FS-t eventek készítéséhez
és miközben készül, tesztelem...
Hát írtam oda is egy dialogot, látható, más id-vel
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/event\", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 99, DIALOG_STYLE_LIST, \"Which event do you want to create?\",\"FOREST DM\", \"Start\", \"Abort\");
return 1;
}
return 0;
}
erre a response:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
{
switch(dialogid == 99)// 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 FOREST DM
{
SendClientMessage(playerid, 0xAAFFCC33, \"Starting event...\");
SendClientMessageToAll(0xAAFFCC33, \"An event has started, use /join to join\");
}
}
}
}
}
return 1;
}
a probléma hogy amikor rányomnék a FOREST DM-re egy Desert Eagle-t ad(pénzért) ami mint látható a game mode-ban van nem a filterscriptben....
Ennek a problémának a megoldásához kérnék segítséget....