03.04.2015, 16:24
pawn Код:
if(newkeys & KEY_FIRE){
if(IsPlayerInRangeOfPoint(playerid, 2.4, -1343.5695,-210.2208,14.1484))
{
new str[86];
format(str, sizeof(str), "Weapons","AK47\n\nM4");
ShowPlayerDialog(playerid, DialogBoxEx, DIALOG_STYLE_MSGBOX, "Weapons", str, "Ok", "Ok");
}
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DialogBoxEx)
{
if(response)
{
if(listitem == 0)
{
GiveItem[playerid][MED_KIT] = 1;
}
if(listitem == 1)
{
GiveItem[playerid][binoculars] = 1;
}
if(listitem == 2)
{
GiveItem[playerid][bandage] = 1;
}
if(listitem == 3)
{
GiveItem[playerid][AK47] = 1;
}
if(listitem == 4)
{
GiveItem[playerid][M4A1] = 1;
}
if(listitem == 5)
{
GiveItem[playerid][MAP] = 1;
}
if(listitem == 6)
{
GiveItem[playerid][FULL_BOTTLE] = 1;
}
}
}