21.11.2010, 17:24
Victious, it needs the case there, how you think it will switch between dialogs?
--- Don't use Victious' code, it will just give more errors.
EDIT: Try this:
--- Don't use Victious' code, it will just give more errors.
EDIT: Try this:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 1:
{
if(response)
{
switch(listitem)
{
case 1:
{
GivePlayerMoney(playerid, -5000);
GivePlayerWeapon(playerid, 28, 50);
SendClientMessage(playerid, COLOR_PINK, "You have just baught a mini uzi with 50 ammunition for $5000!");
}
case 2:
{
GivePlayerMoney(playerid, -7000);
GivePlayerWeapon(playerid, 30, 50);
SendClientMessage(playerid, COLOR_PINK, "You have just baught an AK47 with 50 ammunition for $7,000!");
}
case 3:
{
GivePlayerMoney(playerid, -10000);
GivePlayerWeapon(playerid, 31, 50);
SendClientMessage(playerid, COLOR_PINK, "You have just baught an M4 carbine with 50 ammunition for $10,000!");
}
}
}
else SendClientMessage(playerid, COLOR_RED, "You cancelled!");
}