View Single Post
Old 06/07/2019, 02:23 PM   #15
Plastikmensch
Huge Clucker
 
Join Date: Aug 2016
Posts: 272
Reputation: 22
Default Re: How to give weapons after they choosed?

Why when the player presses cancel? That is not how dialogs work.
Code:
new chosenWeapons[MAX_PLAYERS][2];

//OnDialogResponse
//Dialog 1
if(response) 
{
   chosenWeapons[playerid][0]=weaponid;//weaponid is a placeholder
   ShowPlayerDialog(...);//Dialog 2
}
//Dialog 2
if(response)
{
   chosenWeapons[playerid][1]=weaponid;//this line isn't necessary, if you give weapons here.
   GivePlayerWeapon(playerid,chosenWeapons[playerid][0], ammo);//ammo placeholder for your amount
   GivePlayerWeapon(...);
}
Plastikmensch is offline   Reply With Quote