Help with dialog [SIMPLE]
#6

The one I want to open:
PHP код:
ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_TABLIST_HEADERS, "Class Selection", "Class Name\tRequirements\nAssault\t0 score\nRECON\t500 score\nEngineer\t800 score\nMedic\t1100 score\nSniper\t1250 scores\nPilot\t1700 score\nRambo\t2000 score\nSpy\t4000 score\nCustom Class\tVIP Status", "View", ""); 
The dialog response:
PHP код:
if(dialogid == 444)//dialog id response
            
{
                if(
response)
                    {
                if(
listitem == 0)//the listitem0, defines the number one option of the dialog
                    
{
                   if(
GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
                        
{
                        
ShowPlayerDialog(playerid, DIALOG_CLASS_ASSAULT, DIALOG_STYLE_MSGBOX, "Assault Class", "The Assault Class is the most common used class by a lot of swat and terrorits.\n\n{FF8000}Abilities: {AFAFAF}This class is upgradable.\n This class has many featers available at further levels, such as extra weapon damage, rocket launcher and more!\n\n{FF8000}Weapons: {AFAFAF}Knife, Desert Eagle, M4, Grenades", "Choose","<< Back");
                        
gPlayerClass[playerid] = ASSAULT;//setting the class to ASSAULT
                        
PickedClass[playerid] = 1;
                        
SetPlayerVirtualWorld(playerid, 0);
                        
TogglePlayerControllable(playerid, 1);
                        
ResetPlayerWeapons(playerid);
                        
GivePlayerWeapon(playerid, 24, 170);//deagle
                        
GivePlayerWeapon(playerid, 4, 1);//Knife
                        
GivePlayerWeapon(playerid, 31, 400);//M4
                        
GivePlayerWeapon(playerid, 16, 2);//Grenades
                        
}
                         else
                        {
                            
SendClientMessage(playerid, COLOR_RED, "You have not enough score to choose this class");
                            
ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_TABLIST_HEADERS, "Class Selection", "Class Name\tRequirements\nAssault\t0 score\nRECON\t500 score\nEngineer\t800 score\nMedic\t1100 score\nSniper\t1250 scores\nPilot\t1700 score\nRambo\t2000 score\nSpy\t4000 score\nCustom Class\tVIP Status", "View", "");
                            return 
1;
                          }
                    } 
Reply


Messages In This Thread
Help with dialog [SIMPLE] - by Fantje - 24.05.2016, 08:20
Re: Help with dialog [SIMPLE] - by Micko123 - 24.05.2016, 08:24
Re: Help with dialog [SIMPLE] - by Slawiii - 24.05.2016, 08:28
Re: Help with dialog [SIMPLE] - by Fantje - 24.05.2016, 08:28
Re: Help with dialog [SIMPLE] - by Slawiii - 24.05.2016, 08:30
Re: Help with dialog [SIMPLE] - by Fantje - 24.05.2016, 08:33
Re: Help with dialog [SIMPLE] - by Slawiii - 24.05.2016, 08:41
Re: Help with dialog [SIMPLE] - by Fantje - 24.05.2016, 08:53
Re: Help with dialog [SIMPLE] - by Slawiii - 24.05.2016, 09:42
Re: Help with dialog [SIMPLE] - by Slawiii - 24.05.2016, 09:44

Forum Jump:


Users browsing this thread: 1 Guest(s)