Weapons in dialog list with keystatechange
#1

So, I didn't really make how it should, cos I really forgot, could someone really help me about that
Код:
if(newkeys & KEY_SECONDARY_ATTACK)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 2.0, 1085.3313,-1186.0193,18.3062))
		{
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "{00FFFF}SWAT:", "Equipment \nHealth \nArmour \nArmour + Kevlar \nNightstick \nSmoke Bomb \nDesert Eagle \nShotgun \nMP5 \nM4a1 \nSniper \nBACK", "Ok!", "Cancel");
	return 1;
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
	{
		if(response)
		{
			case 0;
			{
                SetPlayerHealth(playerid, 100);
            	SendClientMessageToAll(playerid, COLOR_SWAT, "Dobio si health.");
 			}
 			case 1;
			{
                SetPlayerArmour(playerid, 100);
				SendClientMessageToAll(playerid, COLOR_SWAT, "Dobio si pancir.");
 			}
 			case 2;
			{
                SetPlayerArmour(playerid, 200);
            	SendClientMessageToAll(playerid, COLOR_SWAT, "Dobio si pancir i kacigu.");
 			}
 			case 3;
			{
                GivePlayerWeapon(playerid, 3, 1);
            	SendClientMessage(playerid, COLOR_SWAT, "Dobio si pendrek.");
 			}
 			case 4;
			{
                GivePlayerWeapon(playerid, 17, 100);
            	SendClientMessageToAll(playerid, COLOR_SWAT, "Dobio si dimnu bombu.");
 			}
 			case 5;
			{
                GivePlayerWeapon(playerid, 24, 1000);
            	SendClientMessageToAll(playerid, COLOR_SWAT, "Dobio si deagle.");
 			}
 			case 6;
			{
                GivePlayerWeapon(playerid, 25, 1000);
                SendClientMessageToAll(playerid, COLOR_SWAT, "Dobio si shotgun.");
 			}
 			case 7;
			{
                GivePlayerWeapon(playerid, 29, 1000);
            	SendClientMessageToAll(playerid, COLOR_SWAT, "Dobio si MP5.");
 			}
    		case 8;
			{
                GivePlayerWeapon(playerid,3 1, 1000);
            	SendClientMessageToAll(playerid, COLOR_SWAT, "Dobio si M4a1.");
 			}
            case 9;
			{
                GivePlayerWeapon(playerid, 34, 1000);
            	SendClientMessageToAll(playerid, COLOR_SWAT, "Dobio si sniper.");
 			}
 			case 10;
			{
			ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "{00FFFF}SWAT:", "Equipment \nHealth \nArmour \nArmour + Kevlar \nNightstick \nSmoke Bomb \nDesert Eagle \nShotgun \nMP5 \nM4a1 \nSniper \nBACK", "Ok!", "Cancel");
			}
 			
			return 1;
}
I have a lot of bugs and I know I made something wrong, please correct me
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)