some help :( - 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: some help :( (
/showthread.php?tid=483427)
some help :( -
Kells - 25.12.2013
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
Код:
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;
}
And
Код:
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");
}
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
Код:
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");
}
it say Case 1 is already defines what to do Thanks
Re: some help :( -
Kells - 25.12.2013
anyone?
Re: some help :( -
Zamora - 25.12.2013
You mean when the player choose a weapon from dialog 68 it don't work?
Re: some help :( -
Raisingz - 26.12.2013
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 0:
{
if(response)
{
switch(listitem)
{
}
}
}
case 1:
{
// ...
}
}
}