21.11.2010, 00:01
(
Последний раз редактировалось BigAl; 21.11.2010 в 00:16.
)
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 1:
{
if(!response)
{
SendClientMessage(playerid, COLOR_RED, "You cancelled!");
return 1;
}
switch(listitem)
{
case 0:
{
if(GetPlayerMoney(playerid) > 5000) return SendClientMessage(playerid, COLOR_RED, "You cannot afford an UZI yet, you need $5,000");
GivePlayerWeapon(playerid, 28, 50);
SendClientMessage(playerid, COLOR_PINK, "You have just baught a mini uzi with 50 ammunition for $5000!");
GivePlayerMoney(playerid, -5000);
}
case 1:
{
if(GetPlayerMoney(playerid) > 7000) return SendClientMessage(playerid, COLOR_RED, "You cannot afford an AK47 yet, You need $7,000");
GivePlayerWeapon(playerid, 30, 50);
SendClientMessage(playerid, COLOR_PINK, "You have just baught an AK47 with 50 ammunition!");
GivePlayerMoney(playerid, -7000);
}
case 2:
{
if(GetPlayerMoney(playerid) > 10000) return SendClientMessage(playerid, COLOR_RED, "You cannot afford an M4, it costs $10,000");
GivePlayerWeapon(playerid, 31, 50);
SendClientMessage(playerid, COLOR_PINK, "You have just baught an M4 carbine with 50 ammunition!");
GivePlayerMoney(playerid, -10000);
}
}
}
}
return 1;
}
How could i add another dialog response to that, for a second dialog.
For example, I have /buy which that ^^ is the script to Respond to that!
but i also want on the onplayerrequestclass another dialog (Listitem) to choose where to spawn. Can anyone tell me how i could have a response added to that ^^ for the OnPlayerRequestClass please?