When player choose a weapon.
#1

I created a dialog of weapons' lists and I don't know how do I script that when a player chooses a listed item from the list, The weapons will stay on him even if he dies untill he decided to reset them (The last option in the dialog).

PHP код:
#define DIALOG_WEAPONS 7
if (strcmp("/weapons"cmdtexttrue10) == 0){
    
ShowPlayerDialog(playeridDIALOG_WEAPONSDIALOG_STYLE_LIST"{00F7FF}рщчйн{FFFFFF}""рщчйн чмйн{FFFFFF}\n рщчйн лбгйн{FFFFFF}\n{0066ff}Deagle - CBUG{FFFFFF}\n айфес рщчйн{FFFFFF}""бзйшд""йцйад");
    return 
1;}
   if(
dialogid == DIALOG_WEAPONS)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
            
ResetPlayerWeapons(playerid);
            
GivePlayerWeapon(playerid2210000);
            
GivePlayerWeapon(playerid2610000);
            
GivePlayerWeapon(playerid2810000);
            
SendClientMessage(playeridCOLOR_YELLOW"!чйбмъ рщчйн чмйн");
            }
            
            if(
listitem == 1)
            {
            
ResetPlayerWeapons(playerid);
            
GivePlayerWeapon(playerid2410000);
            
GivePlayerWeapon(playerid2710000);
            
GivePlayerWeapon(playerid2910000);
            
GivePlayerWeapon(playerid3110000);
            
GivePlayerWeapon(playerid3410000);
            
SendClientMessage(playeridCOLOR_YELLOW"!чйбмъ рщчйн лбгйн");
            }
            
            if(
listitem == 2)
            {
            
ResetPlayerWeapons(playerid);
            
GivePlayerWeapon(playerid2410000);
            
SendClientMessage(playerid0x0066ffff"!C-BUGчйбмъ гйвм мчшбеъ д");
            }
        
            if(
listitem == 3)
            {
            
ResetPlayerWeapons(playerid);
            
SendClientMessage(playeridCOLOR_YELLOW"!айфсъ аъ дрщчйн щмк");
            }
            }
            return 
1;
    } 
This is my old mod so if there will be any question why didn't I use 'case's the answer can be found here
Thanks for the help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)