15.11.2014, 18:33
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_KUPOVINA)
{
if(response) // If they clicked 'Select' or double-clicked a weapon
{
// Give them the weapon
switch(listitem)
{
case 0:
{
GivePlayerWeapon(playerid,41,500);
GivePlayerMoney(playerid,-500);
}
case 1:
{
GivePlayerWeapon(playerid,2,1);
GivePlayerMoney(playerid,-200);
}
}
}
return 1;
}
return 0;
}
{
if(dialogid == DIALOG_KUPOVINA)
{
if(response) // If they clicked 'Select' or double-clicked a weapon
{
// Give them the weapon
switch(listitem)
{
case 0:
{
GivePlayerWeapon(playerid,41,500);
GivePlayerMoney(playerid,-500);
}
case 1:
{
GivePlayerWeapon(playerid,2,1);
GivePlayerMoney(playerid,-200);
}
}
}
return 1;
}
return 0;
}