25.12.2013, 21:29
hey guys im updating my Shop System
WHAT I WANT: i want you to help me in this .. I want some one to tell me how To make 2 Dialogs On 1 Fs
i mean this is the Cmd
And
So If he select Weapons it shows The 1st dialog and if cars it shows 2nd But
i want When the player select the 1st (weapons) it show him A list of weapons if he select a weapon it gives it
the problem is when i do this
it say Case 1 is already defines what to do Thanks
WHAT I WANT: i want you to help me in this .. I want some one to tell me how To make 2 Dialogs On 1 Fs
i mean this is the Cmd
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/shop"))
{
ShowPlayerDialog(playerid, 67, DIALOG_STYLE_LIST, "Shop Menu By :Kells", "Weapons\n Cars\n ", "Buy", "Cancel");
return 1;
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
//
{
if(dialogid == 67)
{
if(!response)
return 1;
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 68, DIALOG_STYLE_LIST, "Weapon Shop Menu By :Kells", "Knife - 100$\non-update- unknow$\nChainsaw - 100$\nGrenade - 1500$\nDesert Eagle - 1150$\nSawnoff Shotgun - 2500$\nMicro SMG - 1000$/Uzi - 500$\nMP5 - 500$\nSniper Rifle - 1000$\nFlamethower - 2000$\nSatchel Charge - 5000$\nFire Extinguisher - 5000$\nNight Vis Goggles - 1050$\nThermal Goggles - 1200$\nParachute - 100$", "Buy", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, 68, DIALOG_STYLE_LIST, "Weapon Shop Menu By :Kells", "test", "Buy", "Cancel");
}
i want When the player select the 1st (weapons) it show him A list of weapons if he select a weapon it gives it
the problem is when i do this
Код:
case 1:
{
if(GetPlayerMoney(playerid) < 100)
return SendClientMessage(playerid, 0x9EC73DAA, "You don't have enough cash to buy this Weapon.");
GivePlayerMoney(playerid, -100);
GivePlayerWeapon(playerid, 9, 1);
SendClientMessage(playerid, 0x2641FEAA, "Enjoy Your Weapon");
}

