ко всем new
Code
new amolspd;

--------------------------------------------------------------------
это в public OnGameModeInit()
Code
amolspd = CreatePickup(1239,1274,246.2109,117.6080,1003.2188);

это в public OnPlayerPickUpPickup(playerid, pickupid)
Code
if(pickupid == amolspd) 

ShowPlayerDialog(playerid, 1, 2,"Выберите оружие!","\nОружие для первого ранга\nОружие для второго ранга\nОружие для третьего ранга\nОружие для четвертого ранга\nОружие для пятого ранга\nОружие для шестого ранга","Взять","Выйти");// тут собственно сами пункты меню 
}

----------------------------------------------------------------------------------------------------------------
это в public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

Code
if(dialogid == 1)

if(response) 

if(listitem == 0) 
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//тут указаны id тех фракция, которые имеют доступ к этому амо, а именно, полиция, фбр и армия. 
if(PlayerInfo[playerid][pRank] > 0)// это строка рангов если меньше 0 то брать нельзя =), как правило 0 ранга нет, а тем более ниже! 

GivePlayerWeapon(playerid,41,1000);// это id оружия и кол патронов. 
GivePlayerWeapon(playerid,24,30); 
GivePlayerWeapon(playerid,3,1); 
SendClientMessage(playerid,COLOR_GRAD3,"Вы взяли оружие для первого ранга"); 

else 

SendClientMessage(playerid,COLOR_RED,"Ваш ранг низок!"); 

else 

SendClientMessage(playerid,COLOR_RED,"Вы не законник!"); 

if(listitem==1) 
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) 
if(PlayerInfo[playerid][pRank] > 1) 

GivePlayerWeapon(playerid,41,1000); 
GivePlayerWeapon(playerid,24,30); 
GivePlayerWeapon(playerid,3,1); 
GivePlayerWeapon(playerid,29,300); 
SendClientMessage(playerid,COLOR_GRAD3,"Вы взяли оружие для второго ранга"); 

else 

SendClientMessage(playerid,COLOR_RED,"Ваш ранг низок!"); 

else 

SendClientMessage(playerid,COLOR_RED,"Вы не законник!"); 

if(listitem==2) 
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) 
if(PlayerInfo[playerid][pRank] > 2) 

GivePlayerWeapon(playerid,41,1000); 
GivePlayerWeapon(playerid,24,30); 
GivePlayerWeapon(playerid,3,1); 
GivePlayerWeapon(playerid,29,300); 
GivePlayerWeapon(playerid,25,100); 
SendClientMessage(playerid,COLOR_GRAD3,"Вы взяли оружие для третьего ранга"); 

else 

SendClientMessage(playerid,COLOR_RED,"Ваш ранг низок!"); 

else 

SendClientMessage(playerid,COLOR_RED,"Вы не законник!"); 

if(listitem==3) 
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) 
if(PlayerInfo[playerid][pRank] > 3) 

GivePlayerWeapon(playerid,41,1000); 
GivePlayerWeapon(playerid,24,30); 
GivePlayerWeapon(playerid,3,1); 
GivePlayerWeapon(playerid,29,300); 
GivePlayerWeapon(playerid,25,100); 
GivePlayerWeapon(playerid,31,200); 
SendClientMessage(playerid,COLOR_GRAD3,"Вы взяли оружие для четвертого ранга"); 

else 

SendClientMessage(playerid,COLOR_RED,"Ваш ранг низок!"); 

else 

SendClientMessage(playerid,COLOR_RED,"Вы не законник!"); 

if(listitem==4) 
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) 
if(PlayerInfo[playerid][pRank] > 4) 

GivePlayerWeapon(playerid,41,1000); 
GivePlayerWeapon(playerid,24,30); 
GivePlayerWeapon(playerid,3,1); 
GivePlayerWeapon(playerid,29,300); 
GivePlayerWeapon(playerid,25,100); 
GivePlayerWeapon(playerid,31,200); 
GivePlayerWeapon(playerid,34,50); 
SendClientMessage(playerid,COLOR_GRAD3,"Вы взяли оружие для пятого ранга"); 

else 

SendClientMessage(playerid,COLOR_RED,"Ваш ранг низок!"); 

else 

SendClientMessage(playerid,COLOR_RED,"Вы не законник!"); 

if(listitem==5) 
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) 
if(PlayerInfo[playerid][pRank] > 5) 

GivePlayerWeapon(playerid,41,1000); 
GivePlayerWeapon(playerid,24,60); 
GivePlayerWeapon(playerid,3,1); 
GivePlayerWeapon(playerid,29,600); 
GivePlayerWeapon(playerid,25,200); 
GivePlayerWeapon(playerid,31,400); 
GivePlayerWeapon(playerid,34,100); 
SendClientMessage(playerid,COLOR_GRAD3,"Вы взяли оружие для шестого ранга"); 

else 

SendClientMessage(playerid,COLOR_RED,"Ваш ранг низок!"); 

else 

SendClientMessage(playerid,COLOR_RED,"Вы не законник!"); 


else 


}

Автор:Latron