OnDialogResponse
#5

U missed some { } anyway
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOG_WEPS1)
	{
		if(response)
		{
			if (listitem == 0)
			{
				GameTextForPlayer(playerid, "Weapon Pack 1 chosen", 3500, 1);
				GivePlayerWeapon(playerid, 4, 1);
				GivePlayerWeapon(playerid, 22, 500);
				GivePlayerWeapon(playerid, 25, 150);
				GivePlayerWeapon(playerid, 28, 850);
				GivePlayerWeapon(playerid, 31, 500);
				GivePlayerWeapon(playerid, 33, 500);
				SetPlayerArmour(playerid, 99.0);
			} else if (listitem == 1)
			{
				GameTextForPlayer(playerid, "Weapon Pack 2 chosen", 3500, 1);
				GivePlayerWeapon(playerid, 16, 1);
				GivePlayerWeapon(playerid, 24, 257);
				GivePlayerWeapon(playerid, 27, 350);
				GivePlayerWeapon(playerid, 30, 550);
				GivePlayerWeapon(playerid, 35, 2);
				SetPlayerArmour(playerid, 50);
			} else if (listitem == 2)
			{
				GameTextForPlayer(playerid, "Weapon pack 3 chosen", 3500, 1);
				GivePlayerWeapon(playerid, 18, 2);
				GivePlayerWeapon(playerid, 24, 500);
				GivePlayerWeapon(playerid, 27, 360);
				GivePlayerWeapon(playerid, 26, 50);
				GivePlayerWeapon(playerid, 29, 500);
				GivePlayerWeapon(playerid, 34, 500);
				GivePlayerWeapon(playerid, 35, 4);
				SetPlayerArmour(playerid, 25);
			}
		}
	}
	return 1;
}
Reply


Messages In This Thread
OnDialogResponse - by Kyance - 12.10.2013, 16:06
Re: OnDialogResponse - by DobbysGamertag - 12.10.2013, 16:12
Re: OnDialogResponse - by Konstantinos - 12.10.2013, 16:14
Re: OnDialogResponse - by Kyance - 12.10.2013, 16:16
Re: OnDialogResponse - by ReVo_ - 12.10.2013, 17:24

Forum Jump:


Users browsing this thread: 1 Guest(s)