[HELP] Medic
#1

pawn Код:
if (!strcmp(cmdtext, "/heal", true))
         {
         
         if(gPlayerClass[playerid] == MEDIC)//if the player is Medic
         {
               SetPlayerHealth(playerid, 100.0);
               return 1;
         }
    }
How to Set this Command for Medic only ?

and this might be useful

pawn Код:
My Define : #define MEDIC
 (gplayerclass)
Reply
#2

Bump
Reply
#3

You can check for skin id, for example.
How do you define that a player is a medic? (How do they choose to be medic)
Reply
#4

Your classes are like gPlayerClass[playerid] 1 - 2 - 3 right?
If so, then #define MEDIC 1 (change 1 to medic class id)
Reply
#5

lol , i mean what do i have to use ? I Want a text that when a Non-Medic types /theal. he will Receive
"You Are Not a Medic!"

@Stinged I Already have it , I did
pawn Код:
#define MEDIC 3
Reply
#6

Is This Okay Now ?

pawn Код:
if (!strcmp(cmdtext, "/heal", true))
         {
         
         if(gPlayerClass[playerid] == MEDIC)//if the player is Medic
         {
               SetPlayerHealth(playerid, 100.0);
               return 1;
         }
         else SendClientMessage(playerid,-1,"COLOR_WHITE "" You have to be in a Medic Class to use this Command");
    }
Tried to Configure this myself , And when i compile , only 1 warning , but its not in this line
Reply
#7

pawn Код:
if (!strcmp(cmdtext, "/heal", true))
         {
         
         if(gPlayerClass[playerid] == MEDIC)//if the player is Medic
         {
               SetPlayerHealth(playerid, 100.0);
               return 1;
         }
         else return SendClientMessage(playerid,-1,"Error: You are not a Medic!");
    }
Reply
#8

Heres the Warning

pawn Код:
D:\Windows Version [0.3z]\filterscripts\TDM.pwn(531) : warning 217: loose indentation
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
What's Wrong with this Identation ?
PHP код:
       }
       return 
1;
}
return 
true;

Reply
#9

post the full code of this function
Reply
#10

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
if(
dialogid == 999)//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
                    
{
                        
SendClientMessage(playeridCOLOR_WHITE"You chose the Assault as your class.");
                        
ShowPlayerDialog(playerid11DIALOG_STYLE_MSGBOX"{6EF83C}Assault Class:""{F81414}Abilities:\n{FFFFFF}A Solo class, good in infantry attacks.\n\n{F81414}Weapons:\n\n{FFFFFF}M4\n{FFFFFF}Shotgun\n{FFFFFF}Deagle""Play","");
                        
gPlayerClass[playerid] = ASSAULT;//setting the class to soldier
                        
PickedClass[playerid] = 1;
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid1);
                        
ResetPlayerWeapons(playerid);
                        
GivePlayerWeapon(playerid31200);//m4
                        
GivePlayerWeapon(playerid25100);//mp5
                        
GivePlayerWeapon(playerid2470);//deagle
                        
}
                    }

                if(
listitem == 1)//the listitem1, defines the number one option of the dialog
                
{
                    if(
GetPlayerScore(playerid) >= 100)//if player have 100 score then  he can choose this class
                    
{
                        
SendClientMessage(playeridCOLOR_WHITE"You chose the Sniper as your class.");
                        
ShowPlayerDialog(playerid11DIALOG_STYLE_MSGBOX"{6EF83C}Sniper Class:""{F81414}Abilities:\n{FFFFFF}A Locater class, Always invisible on map.\n\n{F81414}Weapons:\n\n{FFFFFF}Sniper Rifle\n{FFFFFF}Mp5\n{FFFFFF}Knife""Play","");
                        
gPlayerClass[playerid] = SNIPER;//setting the class to Sniper
                        
PickedClass[playerid] = 1;
                        
RemovePlayerMapIcon(playerid0);
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid1);
                        
ResetPlayerWeapons(playerid);
                        
GivePlayerWeapon(playerid34250);//sniper
                        
GivePlayerWeapon(playerid29250);//mp5
                        
GivePlayerWeapon(playerid41);//knife
                        
}
                    }

                if(
listitem == 2)//the listitem2, defines the number one option of the dialog
                
{
                    if(
GetPlayerScore(playerid) >= 500)//if player have 500 score then  he can choose this class
                        
{
                        
SendClientMessage(playeridCOLOR_WHITE"You chose the Medic as your class.");
                        
ShowPlayerDialog(playerid11DIALOG_STYLE_MSGBOX"{6EF83C}Medic Class:""{F81414}Abilities:\n{FFFFFF}A Helper Class\nCan Heal TeamMates.\n\n{F81414}Weapons:\n\n{FFFFFF}Shotgun\n{FFFFFF}Silent Pistol\n{FFFFFF}mp5""Play","");
                        
gPlayerClass[playerid] = MEDIC;//setting the class to medic
                        
PickedClass[playerid] = 1;
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid1);
                        
ResetPlayerWeapons(playerid);
                        
GivePlayerWeapon(playerid25200);//shotgun
                        
GivePlayerWeapon(playerid23200);//silent pistol
                          
GivePlayerWeapon(playerid29150);//mp5
                        
}
                    }

                if(
listitem == 3)//the listitem3, defines the number one option of the dialog
                
{
                    if(
GetPlayerScore(playerid) >= 1000)//if player have 1000 score then  he can choose this class
                    
{
                        
SendClientMessage(playeridCOLOR_WHITE"You chose the Engineer as your class.");
                        
ShowPlayerDialog(playerid11DIALOG_STYLE_MSGBOX"{6EF83C}Engineer Class:""{F81414}Abilities:\n{FFFFFF}A Strong Class.\n{FFFFFF}Can Drive Tanks\n{F81414}Weapons:\nSpas-12\n{FFFFFF}Deagle\n{FFFFFF}RPG\n{FFFFFF}Grenade""Play","");
                        
gPlayerClass[playerid] = ENGINEER;//setting the class to Engineer
                        
PickedClass[playerid] = 1;
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid1);
                        
ResetPlayerWeapons(playerid);
                        
GivePlayerWeapon(playerid2770);//SPAS-12
                        
GivePlayerWeapon(playerid2430);//Deagle
                           
GivePlayerWeapon(playerid352);//rpg
                        
GivePlayerWeapon(playerid163);//Grenades
                        
}
                    }

                if(
listitem == 4)//the listitem4, defines the number one option of the dialog
                
{
                    if(
GetPlayerScore(playerid) >= 1500)//if player have 1500 score then  he can choose this class
                        
{
                        
SendClientMessage(playeridCOLOR_WHITE"You chose the Airforce as your class.");
                        
ShowPlayerDialog(playerid11DIALOG_STYLE_MSGBOX"{6EF83C}Airforce Class:""{F81414}Abilities:\n{FFFFFF}A Airforce class, Can drive hunter, hydra & sea sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Molotov\n{FFFFFF}Shotgun""Play","");
                        
gPlayerClass[playerid] = AIRFORCE;//setting the class to Airforce
                        
PickedClass[playerid] = 1;
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid1);
                        
ResetPlayerWeapons(playerid);
                        
GivePlayerWeapon(playerid24200);//deagle
                        
GivePlayerWeapon(playerid174);//moltove
                         
GivePlayerWeapon(playerid25100);//shotgun
                        
}
                    }

                if(
listitem == 5)//the listitem5, defines the number one option of the dialog
                
{
                    if(
GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
                        
{
                        
SendClientMessage(playeridCOLOR_WHITE"You chose the Spy as your class.");
                        
ShowPlayerDialog(playerid11DIALOG_STYLE_MSGBOX"{6EF83C}Spy Class:""{F81414}Abilities:\n{FFFFFF}A Victim class, Can Disguise to enemy assaults by /dis\n\n{F81414}Weapons:\n\n{FFFFFF}Mp5\n{FFFFFF}Silent Pistol\n{FFFFFF}M4\n{FFFFFF}Deagle""Play","");
                        
gPlayerClass[playerid] = SPY;//setting the class to Spy
                        
PickedClass[playerid] = 1;
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid1);
                        
ResetPlayerWeapons(playerid);
                        
GivePlayerWeapon(playerid29200);//mp5
                          
GivePlayerWeapon(playerid23200);//silent pistol
                          
GivePlayerWeapon(playerid31200);//m4
                        
GivePlayerWeapon(playerid24200);//deagle
                        
}
                }
                if(
listitem == 5)//the listitem5, defines the number one option of the dialog
                
{
                    if(
GetPlayerScore(playerid) >= 5000)//if player have 0 score then  he can choose this class
                        
{
                        
SendClientMessage(playeridCOLOR_WHITE"You chose the Special Forces as your class.");
                        
ShowPlayerDialog(playerid11DIALOG_STYLE_MSGBOX"{6EF83C}Special Force Class:""{F81414}Abilities:\n{FFFFFF}A Powerful Class\nImproved Weapons and Tactics\n{F81414}Weapons:\n\n{FFFFFF}Mp5\n{FFFFFF}Spas-12\n{FFFFFF}M4\n{FFFFFF}Deagle""Play","");
                        
gPlayerClass[playerid] = SPECIAL_FORCE;//setting the class to Special Force
                        
PickedClass[playerid] = 1;
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid1);
                        
ResetPlayerWeapons(playerid);
                        
GivePlayerWeapon(playerid29200);//mp5
                           
GivePlayerWeapon(playerid2770);//SPAS-12
                        
GivePlayerWeapon(playerid31200);//m4
                        
GivePlayerWeapon(playerid24200);//deagle
                        
}
                }
                return 
1;
       }
       return 
1;
}
return 
true;

Reply
#11

try this

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 999)//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
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "You chose the Assault as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Assault Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, good in infantry attacks.\n\n{F81414}Weapons:\n\n{FFFFFF}M4\n{FFFFFF}Shotgun\n{FFFFFF}Deagle", "Play","");
                            gPlayerClass[playerid] = ASSAULT;//setting the class to soldier
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            ResetPlayerWeapons(playerid);
                            GivePlayerWeapon(playerid, 31, 200);//m4
                            GivePlayerWeapon(playerid, 25, 100);//mp5
                            GivePlayerWeapon(playerid, 24, 70);//deagle
                        }
                    }

                    if(listitem == 1)//the listitem1, defines the number one option of the dialog
                    {
                        if(GetPlayerScore(playerid) >= 100)//if player have 100 score then  he can choose this class
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "You chose the Sniper as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Sniper Class:", "{F81414}Abilities:\n{FFFFFF}A Locater class, Always invisible on map.\n\n{F81414}Weapons:\n\n{FFFFFF}Sniper Rifle\n{FFFFFF}Mp5\n{FFFFFF}Knife", "Play","");
                            gPlayerClass[playerid] = SNIPER;//setting the class to Sniper
                            PickedClass[playerid] = 1;
                            RemovePlayerMapIcon(playerid, 0);
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            ResetPlayerWeapons(playerid);
                            GivePlayerWeapon(playerid, 34, 250);//sniper
                            GivePlayerWeapon(playerid, 29, 250);//mp5
                            GivePlayerWeapon(playerid, 4, 1);//knife
                        }
                    }
                    if(listitem == 2)//the listitem2, defines the number one option of the dialog
                    {
                        if(GetPlayerScore(playerid) >= 500)//if player have 500 score then  he can choose this class
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "You chose the Medic as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Medic Class:", "{F81414}Abilities:\n{FFFFFF}A Helper Class\nCan Heal TeamMates.\n\n{F81414}Weapons:\n\n{FFFFFF}Shotgun\n{FFFFFF}Silent Pistol\n{FFFFFF}mp5", "Play","");
                        gPlayerClass[playerid] = MEDIC;//setting the class to medic
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        ResetPlayerWeapons(playerid);
                        GivePlayerWeapon(playerid, 25, 200);//shotgun
                        GivePlayerWeapon(playerid, 23, 200);//silent pistol
                        GivePlayerWeapon(playerid, 29, 150);//mp5
                        }
                    }
                    if(listitem == 3)//the listitem3, defines the number one option of the dialog
                    {
                        if(GetPlayerScore(playerid) >= 1000)//if player have 1000 score then  he can choose this class
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "You chose the Engineer as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Engineer Class:", "{F81414}Abilities:\n{FFFFFF}A Strong Class.\n{FFFFFF}Can Drive Tanks\n{F81414}Weapons:\nSpas-12\n{FFFFFF}Deagle\n{FFFFFF}RPG\n{FFFFFF}Grenade", "Play","");
                        gPlayerClass[playerid] = ENGINEER;//setting the class to Engineer
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        ResetPlayerWeapons(playerid);
                        GivePlayerWeapon(playerid, 27, 70);//SPAS-12
                        GivePlayerWeapon(playerid, 24, 30);//Deagle
                        GivePlayerWeapon(playerid, 35, 2);//rpg
                        GivePlayerWeapon(playerid, 16, 3);//Grenades
                        }
                    }

                    if(listitem == 4)//the listitem4, defines the number one option of the dialog
                    {
                        if(GetPlayerScore(playerid) >= 1500)//if player have 1500 score then  he can choose this class
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "You chose the Airforce as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Airforce Class:", "{F81414}Abilities:\n{FFFFFF}A Airforce class, Can drive hunter, hydra & sea sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Molotov\n{FFFFFF}Shotgun", "Play","");
                        gPlayerClass[playerid] = AIRFORCE;//setting the class to Airforce
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        ResetPlayerWeapons(playerid);
                        GivePlayerWeapon(playerid, 24, 200);//deagle
                        GivePlayerWeapon(playerid, 17, 4);//moltove
                        GivePlayerWeapon(playerid, 25, 100);//shotgun
                        }
                    }

                    if(listitem == 5)//the listitem5, defines the number one option of the dialog
                    {
                        if(GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "You chose the Spy as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Spy Class:", "{F81414}Abilities:\n{FFFFFF}A Victim class, Can Disguise to enemy assaults by /dis\n\n{F81414}Weapons:\n\n{FFFFFF}Mp5\n{FFFFFF}Silent Pistol\n{FFFFFF}M4\n{FFFFFF}Deagle", "Play","");
                        gPlayerClass[playerid] = SPY;//setting the class to Spy
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        ResetPlayerWeapons(playerid);
                        GivePlayerWeapon(playerid, 29, 200);//mp5
                        GivePlayerWeapon(playerid, 23, 200);//silent pistol
                        GivePlayerWeapon(playerid, 31, 200);//m4
                        GivePlayerWeapon(playerid, 24, 200);//deagle
                        }
                    }
                    if(listitem == 5)//the listitem5, defines the number one option of the dialog
                    {
                        if(GetPlayerScore(playerid) >= 5000)//if player have 0 score then  he can choose this class
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "You chose the Special Forces as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Special Force Class:", "{F81414}Abilities:\n{FFFFFF}A Powerful Class\nImproved Weapons and Tactics\n{F81414}Weapons:\n\n{FFFFFF}Mp5\n{FFFFFF}Spas-12\n{FFFFFF}M4\n{FFFFFF}Deagle", "Play","");
                        gPlayerClass[playerid] = SPECIAL_FORCE;//setting the class to Special Force
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        ResetPlayerWeapons(playerid);
                        GivePlayerWeapon(playerid, 29, 200);//mp5
                        GivePlayerWeapon(playerid, 27, 70);//SPAS-12
                        GivePlayerWeapon(playerid, 31, 200);//m4
                        GivePlayerWeapon(playerid, 24, 200);//deagle
                        }
                    }
                    return 1;
     }
     return 1;
}
return true;
}
Reply
#12

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 999)//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
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You chose the Assault as your class.");
                    ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Assault Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, good in infantry attacks.\n\n{F81414}Weapons:\n\n{FFFFFF}M4\n{FFFFFF}Shotgun\n{FFFFFF}Deagle", "Play","");
                    gPlayerClass[playerid] = ASSAULT;//setting the class to soldier
                    PickedClass[playerid] = 1;
                    SetPlayerVirtualWorld(playerid, 0);
                    TogglePlayerControllable(playerid, 1);
                    ResetPlayerWeapons(playerid);
                    GivePlayerWeapon(playerid, 31, 200);//m4
                    GivePlayerWeapon(playerid, 25, 100);//mp5
                    GivePlayerWeapon(playerid, 24, 70);//deagle
                }
            }

            if(listitem == 1)//the listitem1, defines the number one option of the dialog
            {
                if(GetPlayerScore(playerid) >= 100)//if player have 100 score then  he can choose this class
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You chose the Sniper as your class.");
                    ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Sniper Class:", "{F81414}Abilities:\n{FFFFFF}A Locater class, Always invisible on map.\n\n{F81414}Weapons:\n\n{FFFFFF}Sniper Rifle\n{FFFFFF}Mp5\n{FFFFFF}Knife", "Play","");
                    gPlayerClass[playerid] = SNIPER;//setting the class to Sniper
                    PickedClass[playerid] = 1;
                    RemovePlayerMapIcon(playerid, 0);
                    SetPlayerVirtualWorld(playerid, 0);
                    TogglePlayerControllable(playerid, 1);
                    ResetPlayerWeapons(playerid);
                    GivePlayerWeapon(playerid, 34, 250);//sniper
                    GivePlayerWeapon(playerid, 29, 250);//mp5
                    GivePlayerWeapon(playerid, 4, 1);//knife
                }
            }

            if(listitem == 2)//the listitem2, defines the number one option of the dialog
            {
                if(GetPlayerScore(playerid) >= 500)//if player have 500 score then  he can choose this class
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You chose the Medic as your class.");
                    ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Medic Class:", "{F81414}Abilities:\n{FFFFFF}A Helper Class\nCan Heal TeamMates.\n\n{F81414}Weapons:\n\n{FFFFFF}Shotgun\n{FFFFFF}Silent Pistol\n{FFFFFF}mp5", "Play","");
                    gPlayerClass[playerid] = MEDIC;//setting the class to medic
                    PickedClass[playerid] = 1;
                    SetPlayerVirtualWorld(playerid, 0);
                    TogglePlayerControllable(playerid, 1);
                    ResetPlayerWeapons(playerid);
                    GivePlayerWeapon(playerid, 25, 200);//shotgun
                    GivePlayerWeapon(playerid, 23, 200);//silent pistol
                    GivePlayerWeapon(playerid, 29, 150);//mp5
                }
            }

            if(listitem == 3)//the listitem3, defines the number one option of the dialog
            {
                if(GetPlayerScore(playerid) >= 1000)//if player have 1000 score then  he can choose this class
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You chose the Engineer as your class.");
                    ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Engineer Class:", "{F81414}Abilities:\n{FFFFFF}A Strong Class.\n{FFFFFF}Can Drive Tanks\n{F81414}Weapons:\nSpas-12\n{FFFFFF}Deagle\n{FFFFFF}RPG\n{FFFFFF}Grenade", "Play","");
                    gPlayerClass[playerid] = ENGINEER;//setting the class to Engineer
                    PickedClass[playerid] = 1;
                    SetPlayerVirtualWorld(playerid, 0);
                    TogglePlayerControllable(playerid, 1);
                    ResetPlayerWeapons(playerid);
                    GivePlayerWeapon(playerid, 27, 70);//SPAS-12
                    GivePlayerWeapon(playerid, 24, 30);//Deagle
                    GivePlayerWeapon(playerid, 35, 2);//rpg
                    GivePlayerWeapon(playerid, 16, 3);//Grenades
                }
            }

            if(listitem == 4)//the listitem4, defines the number one option of the dialog
            {
                if(GetPlayerScore(playerid) >= 1500)//if player have 1500 score then  he can choose this class
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You chose the Airforce as your class.");
                    ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Airforce Class:", "{F81414}Abilities:\n{FFFFFF}A Airforce class, Can drive hunter, hydra & sea sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Molotov\n{FFFFFF}Shotgun", "Play","");
                    gPlayerClass[playerid] = AIRFORCE;//setting the class to Airforce
                    PickedClass[playerid] = 1;
                    SetPlayerVirtualWorld(playerid, 0);
                    TogglePlayerControllable(playerid, 1);
                    ResetPlayerWeapons(playerid);
                    GivePlayerWeapon(playerid, 24, 200);//deagle
                    GivePlayerWeapon(playerid, 17, 4);//moltove
                    GivePlayerWeapon(playerid, 25, 100);//shotgun
                }
            }

            if(listitem == 5)//the listitem5, defines the number one option of the dialog
            {
                if(GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You chose the Spy as your class.");
                    ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Spy Class:", "{F81414}Abilities:\n{FFFFFF}A Victim class, Can Disguise to enemy assaults by /dis\n\n{F81414}Weapons:\n\n{FFFFFF}Mp5\n{FFFFFF}Silent Pistol\n{FFFFFF}M4\n{FFFFFF}Deagle", "Play","");
                    gPlayerClass[playerid] = SPY;//setting the class to Spy
                    PickedClass[playerid] = 1;
                    SetPlayerVirtualWorld(playerid, 0);
                    TogglePlayerControllable(playerid, 1);
                    ResetPlayerWeapons(playerid);
                    GivePlayerWeapon(playerid, 29, 200);//mp5
                    GivePlayerWeapon(playerid, 23, 200);//silent pistol
                    GivePlayerWeapon(playerid, 31, 200);//m4
                    GivePlayerWeapon(playerid, 24, 200);//deagle
                }
            }
            if(listitem == 5)//the listitem5, defines the number one option of the dialog
            {
                if(GetPlayerScore(playerid) >= 5000)//if player have 0 score then  he can choose this class
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You chose the Special Forces as your class.");
                    ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Special Force Class:", "{F81414}Abilities:\n{FFFFFF}A Powerful Class\nImproved Weapons and Tactics\n{F81414}Weapons:\n\n{FFFFFF}Mp5\n{FFFFFF}Spas-12\n{FFFFFF}M4\n{FFFFFF}Deagle", "Play","");
                    gPlayerClass[playerid] = SPECIAL_FORCE;//setting the class to Special Force
                    PickedClass[playerid] = 1;
                    SetPlayerVirtualWorld(playerid, 0);
                    TogglePlayerControllable(playerid, 1);
                    ResetPlayerWeapons(playerid);
                    GivePlayerWeapon(playerid, 29, 200);//mp5
                    GivePlayerWeapon(playerid, 27, 70);//SPAS-12
                    GivePlayerWeapon(playerid, 31, 200);//m4
                    GivePlayerWeapon(playerid, 24, 200);//deagle
                }
            }
            return 1;
        }
        return 1;
    }
    return true;
}
Reply
#13

Bump
Reply
#14

Quote:
Originally Posted by NewbieTester
Посмотреть сообщение
Bump
1- I posted the indentation fix
2- Difference between my post and your 'bump', 8 minutes.
...
Reply
#15

Late reply , so I think We post at the same time ? xD
and you Double Posted xD
Untitled.jpg

thanks Stinged , +REP for you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)