Need help With Classes.
#1

Guys i use below codes. When i choose pilot i can sit in hunter, hydra but not in sparrow which is ok. I did it my self. When i take engineer i can sit in tanks. But when i take Mercenary i can't sit in sparrow why?? I want that mercenary can sit in sparrow only.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new Float:PosX,Float:PosY,Float:PosZ,model = GetVehicleModel(vehicleid);
   
//Sparrow=======================================================================
    if(model == 447)//Sparrow
    {
        if(GetVehicleModel(vehicleid) == 447 && gPlayerClass[playerid] == ASSAULT)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Mercenary to Fly Sea Sparrow!");
        }
    }
    if(model == 447)//Sparrow
    {
        if(GetVehicleModel(vehicleid) == 447 && gPlayerClass[playerid] == SNIPER)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Mercenary to Fly Sea Sparrow!");
        }
    }
    if(model == 447)//Sparrow
    {
        if(GetVehicleModel(vehicleid) == 447 && gPlayerClass[playerid] == ENGINEER)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Mercenary to Fly Sea Sparrow!");
        }
    }
    if(model == 447)//Sparrow
    {
        if(GetVehicleModel(vehicleid) == 447 && gPlayerClass[playerid] == JETTROOPER)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Mercenary to Fly Sea Sparrow!");
        }
    }
    if(model == 447)//Sparrow
    {
        if(GetVehicleModel(vehicleid) == 447 && gPlayerClass[playerid] == PILOT)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Mercenary to Fly Sea Sparrow!");
        }
    }
   
//Tank==========================================================================
    if(model == 432)//Tank
    {
        if(GetVehicleModel(vehicleid) == 432 && gPlayerClass[playerid] == ASSAULT)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Engineer to Drive Tank!");
        }
    }
    if(model == 432)//Tank
    {
        if(GetVehicleModel(vehicleid) == 432 && gPlayerClass[playerid] == SNIPER)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Engineer to Drive Tank!");
        }
    }
    if(model == 447)//Sparrow
    {
        if(GetVehicleModel(vehicleid) == 447 && gPlayerClass[playerid] == MERCENARY)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Engineer to Drive Tank!");
        }
    }
    if(model == 432)//Tank
    {
        if(GetVehicleModel(vehicleid) == 432 && gPlayerClass[playerid] == JETTROOPER)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Engineer to Drive Tank!");
        }
    }
    if(model == 432)//Tank
    {
        if(GetVehicleModel(vehicleid) == 432 && gPlayerClass[playerid] == PILOT)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Engineer to Drive Tank!");
        }
    }
   
//Hydra=========================================================================
    if(model == 520)//Hydra
    {
        if(GetVehicleModel(vehicleid) == 520 && gPlayerClass[playerid] == ASSAULT)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hydra!");
        }
    }
    if(model == 520)//Hydra
    {
        if(GetVehicleModel(vehicleid) == 520 && gPlayerClass[playerid] == SNIPER)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hydra!");
        }
    }
    if(model == 520)//Hydra
    {
        if(GetVehicleModel(vehicleid) == 520 && gPlayerClass[playerid] == ENGINEER)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hydra!");
        }
    }
    if(model == 447)//Sparrow
    {
        if(GetVehicleModel(vehicleid) == 447 && gPlayerClass[playerid] == MERCENARY)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hydra!");
        }
    }
    if(model == 520)//Hydra
    {
        if(GetVehicleModel(vehicleid) == 520 && gPlayerClass[playerid] == JETTROOPER)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hydra!");
        }
    }
   
//Hunter========================================================================
    if(model == 425)//Hunter
    {
        if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == ASSAULT)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hunter!");
        }
    }
    if(model == 425)//Hunter
    {
        if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == SNIPER)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hunter!");
        }
    }
    if(model == 425)//Hunter
    {
        if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == ENGINEER)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hunter!");
        }
    }
    if(model == 447)//Sparrow
    {
        if(GetVehicleModel(vehicleid) == 447 && gPlayerClass[playerid] == MERCENARY)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hunter!");
        }
    }
    if(model == 425)//Hunter
    {
        if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == JETTROOPER)
        {//then
            GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
            SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hunter!");
        }
    }
   
    return 1;
}

Next how can sniper class be invisible from map??

3rd that I USE THIS TO SWITCH CLASS:

pawn Код:
CMD:sc(playerid,parmas[])
    {
    SetPlayerHealth(playerid, 0.00);
    ResetPlayerWeapons(playerid);
    ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 6)  \nPilot Class  (Need Rank 7) ", "Choose","");
    return 1;
    }
But when we chose next class, we have previous class weapons. So how can we reset weapons (no weapons)?? when choosing class with /sc
Reply
#2

Try this code
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new Float:PosX,Float:PosY,Float:PosZ,model = GetVehicleModel(vehicleid);

    switch(model)
    {
        case 447 : //Sparrow
        {
            switch (gPlayerClass[playerid])
            {
                case MERCENARY : return 1;
                default :
                {
                    GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
                    SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
                    SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Mercenary to Fly Sea Sparrow!");
                }
            }
        }
        case 432 : //Tank
        {
            switch (gPlayerClass[playerid])
            {
                case ENGINEER : return 1;
                default :
                {
                    GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
                    SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
                    SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Engineer to Drive Tank!");
                }
            }
        }
        case 520 ://Hydra
        {
            switch (gPlayerClass[playerid])
            {
                case PILOT : return 1;
                default :
                {
                    GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
                    SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
                    SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hydra!");
                }
            }
        }
        case 425 ://Hunter
        {
            switch (gPlayerClass[playerid])
            {
                case PILOT : return 1;
                default :
                {
                    GetPlayerPos(playerid,PosX,PosY,PosZ);//getting player pos
                    SetPlayerPos(playerid,PosX,PosY,PosZ);//setting player to same pos to avoid entering vehicle
                    SendClientMessage(playerid, 0xAA3333AA, "ERROR: You Need to be Pilot to Fly Hunter!");
                }
            }
        }
    }
   
    return 1;
}
Reply
#3

Thanks bro rep added. Do u know how can i solve other two prob??
Reply
#4

pawn Код:
CMD:sc(playerid,parmas[])
    {
    #pragma unused params
    return ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 6)  \nPilot Class  (Need Rank 7) ", "Choose","");
    }

//In OnDialogResponse
if(dialogid==999)
{
//After he select class
ResetPlayerWeapons(playerid);
}
Reply
#5

Giving Too much error. Compile it yourself Please. i'll show you dialog:

pawn Код:
if(dialogid == 999)
            {
                if(response)
                    {
                if(listitem == 0)
                    {
                    if(GetPlayerScore(playerid) >= 0)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Assault as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Assult Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, good in infantry attacks.\n\n{F81414}Weapons:\n\n{FFFFFF}Knife\n{FFFFFF}M4\n{FFFFFF}Spaz12\n{FFFFFF}Deagle", "OK","");
                        gPlayerClass[playerid] = ASSAULT;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 27, 500);
                        GivePlayerWeapon(playerid, 24, 500);
                        GivePlayerWeapon(playerid, 31, 700);
                        }
                    }

                if(listitem == 1)
                    {
                    if(GetPlayerScore(playerid) >= 250)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: 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}Rifle\n{FFFFFF}Knife\n{FFFFFF}Shotgun", "OK","");
                        gPlayerClass[playerid] = SNIPER;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        {
                        if(gTeam[playerid] == TEAM_PAKISTAN) {
                            SetPlayerColor(playerid,0x008000AA);
                        } else if(gTeam[playerid] ==TEAM_GERMANY) {
                            SetPlayerColor(playerid,0xFF8000AA);
                        } else if(gTeam[playerid] ==TEAM_USA) {
                            SetPlayerColor(playerid,0x0080FFAA);
                        } else if(gTeam[playerid] ==TEAM_RUSSIA) {
                            SetPlayerColor(playerid,0xFF0000AA);
                        } else if(gTeam[playerid] ==TEAM_INDIA) {
                            SetPlayerColor(playerid,0xFFFF00AA);
                        }
                        }
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 34, 400);
                        GivePlayerWeapon(playerid, 25, 200);
                        GivePlayerWeapon(playerid, 33, 300);
                        }
                    else
            {
                SendClientMessage(playerid,COLOR_RED,"You need to be on Rank 2 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }

                if(listitem == 2)
                    {
                    if(GetPlayerScore(playerid) >= 400)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Medic as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Medic Class:", "{F81414}Abilities:\n{FFFFFF}A Strong class. Very good on land\nCan heal themselve using /usekit cmd.\n\n{F81414}Weapons:\n\n{FFFFFF}Spas12\n{FFFFFF}Silent Pistol\n{FFFFFF}RPG\n{FFFFFF}Desert Eagle", "OK","");
                        gPlayerClass[playerid] = MEDIC;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 27, 400);
                        GivePlayerWeapon(playerid, 23, 400);
                        GivePlayerWeapon(playerid, 35, 2);
                        GivePlayerWeapon(playerid, 24, 300);
                        }
                    else
            {
                SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 3 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }
           
            if(listitem == 3)
                    {
                    if(GetPlayerScore(playerid) >= 600)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Engineer as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Engineer Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, can drice tanks.\n\n{F81414}Weapons:\n\n{FFFFFF}Tec-9\n{FFFFFF}Colt\n{FFFFFF}Knife\n{FFFFFF}Moltov", "OK","");
                        gPlayerClass[playerid] = ENGINEER;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 32, 1000);
                        GivePlayerWeapon(playerid, 22, 700);
                        GivePlayerWeapon(playerid, 18, 2);
                        }
                    else
            {
                SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 4 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }

                if(listitem == 4)
                    {
                    if(GetPlayerScore(playerid) >= 800)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Mercenary as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Mercenary Class Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, can fly sea sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Tec-9\n{FFFFFF}Colt\n{FFFFFF}Knife\n{FFFFFF}Moltov", "OK","");
                        gPlayerClass[playerid] = MERCENARY;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 32, 2000);
                        GivePlayerWeapon(playerid, 22, 700);
                        GivePlayerWeapon(playerid, 18, 2);
                        }
                    else
            {
                SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 5 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }

                if(listitem == 5)
                    {
                    if(GetPlayerScore(playerid) >= 1500)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Jet Trooper as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Jet Trooper Class:", "{F81414}Abilities:\n{FFFFFF}A Airforce class, Very Good in Air. Can drive Hunter, Hydra & Sea Sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Tear Gas\n{FFFFFF}Shotgun\n{FFFFFF}9mm", "OK","");
                        gPlayerClass[playerid] = JETTROOPER;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 22, 300);
                        GivePlayerWeapon(playerid, 24, 400);
                        GivePlayerWeapon(playerid, 17, 4);
                        GivePlayerWeapon(playerid, 25, 200);
                        }
                       
                        else
            {
                SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 7 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }

                if(listitem == 6)
                    {
                    if(GetPlayerScore(playerid) >= 2000)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Pilot as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Pilot Class:", "{F81414}Abilities:\n{FFFFFF}A Airforce class, Very Good in Air. Can drive Hunter, Hydra & Sea Sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Tear Gas\n{FFFFFF}Shotgun\n{FFFFFF}9mm", "OK","");
                        gPlayerClass[playerid] = PILOT;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 22, 300);
                        GivePlayerWeapon(playerid, 24, 400);
                        GivePlayerWeapon(playerid, 17, 4);
                        GivePlayerWeapon(playerid, 25, 200);
                        }

                        else
            {
                SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 8 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }

                return 1;
        }
                return 1;
    }
Reply
#6

Try this
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch (dialogid)
    {
        case 999:
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0:
                    {
                        if(GetPlayerScore(playerid) >= 0)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Assault as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Assult Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, good in infantry attacks.\n\n{F81414}Weapons:\n\n{FFFFFF}Knife\n{FFFFFF}M4\n{FFFFFF}Spaz12\n{FFFFFF}Deagle", "OK","");
                            gPlayerClass[playerid] = ASSAULT;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 4, 1);
                            GivePlayerWeapon(playerid, 27, 500);
                            GivePlayerWeapon(playerid, 24, 500);
                            GivePlayerWeapon(playerid, 31, 700);
                            return 1;
                        }
                    }
                    case 1:
                    {
                        if(GetPlayerScore(playerid) >= 250)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: 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}Rifle\n{FFFFFF}Knife\n{FFFFFF}Shotgun", "OK","");
                            gPlayerClass[playerid] = SNIPER;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            if(gTeam[playerid] == TEAM_PAKISTAN)    SetPlayerColor(playerid,0x008000AA);
                            else if(gTeam[playerid] ==TEAM_GERMANY) SetPlayerColor(playerid,0xFF8000AA);
                            else if(gTeam[playerid] ==TEAM_USA)     SetPlayerColor(playerid,0x0080FFAA);
                            else if(gTeam[playerid] ==TEAM_RUSSIA)  SetPlayerColor(playerid,0xFF0000AA);
                            else if(gTeam[playerid] ==TEAM_INDIA)   SetPlayerColor(playerid,0xFFFF00AA);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 4, 1);
                            GivePlayerWeapon(playerid, 34, 400);
                            GivePlayerWeapon(playerid, 25, 200);
                            GivePlayerWeapon(playerid, 33, 300);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid,COLOR_RED,"You need to be on Rank 2 to get this Class.");
                            ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                            TogglePlayerControllable(playerid, 0);
                            return 1;
                        }
                    }
                    case 2:
                    {
                        if(GetPlayerScore(playerid) >= 400)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Medic as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Medic Class:", "{F81414}Abilities:\n{FFFFFF}A Strong class. Very good on land\nCan heal themselve using /usekit cmd.\n\n{F81414}Weapons:\n\n{FFFFFF}Spas12\n{FFFFFF}Silent Pistol\n{FFFFFF}RPG\n{FFFFFF}Desert Eagle", "OK","");
                            gPlayerClass[playerid] = MEDIC;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 27, 400);
                            GivePlayerWeapon(playerid, 23, 400);
                            GivePlayerWeapon(playerid, 35, 2);
                            GivePlayerWeapon(playerid, 24, 300);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 3 to get this Class.");
                            ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                            TogglePlayerControllable(playerid, 0);
                            return 1;
                        }
                    }
                    case 3:
                    {
                        if(GetPlayerScore(playerid) >= 600)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Engineer as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Engineer Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, can drice tanks.\n\n{F81414}Weapons:\n\n{FFFFFF}Tec-9\n{FFFFFF}Colt\n{FFFFFF}Knife\n{FFFFFF}Moltov", "OK","");
                            gPlayerClass[playerid] = ENGINEER;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 4, 1);
                            GivePlayerWeapon(playerid, 32, 1000);
                            GivePlayerWeapon(playerid, 22, 700);
                            GivePlayerWeapon(playerid, 18, 2);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 4 to get this Class.");
                            ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                            TogglePlayerControllable(playerid, 0);
                            return 1;
                        }
                    }
                    case 4:
                    {
                        if(GetPlayerScore(playerid) >= 800)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Mercenary as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Mercenary Class Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, can fly sea sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Tec-9\n{FFFFFF}Colt\n{FFFFFF}Knife\n{FFFFFF}Moltov", "OK","");
                            gPlayerClass[playerid] = MERCENARY;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 4, 1);
                            GivePlayerWeapon(playerid, 32, 2000);
                            GivePlayerWeapon(playerid, 22, 700);
                            GivePlayerWeapon(playerid, 18, 2);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 5 to get this Class.");
                            ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                            TogglePlayerControllable(playerid, 0);
                            return 1;
                        }
                    }
                    case 5:
                    {
                        if(GetPlayerScore(playerid) >= 1500)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Jet Trooper as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Jet Trooper Class:", "{F81414}Abilities:\n{FFFFFF}A Airforce class, Very Good in Air. Can drive Hunter, Hydra & Sea Sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Tear Gas\n{FFFFFF}Shotgun\n{FFFFFF}9mm", "OK","");
                            gPlayerClass[playerid] = JETTROOPER;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 22, 300);
                            GivePlayerWeapon(playerid, 24, 400);
                            GivePlayerWeapon(playerid, 17, 4);
                            GivePlayerWeapon(playerid, 25, 200);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 7 to get this Class.");
                            ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                            TogglePlayerControllable(playerid, 0);
                            return 1;
                        }
                    }
                    case 6:
                    {
                        if(GetPlayerScore(playerid) >= 2000)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Pilot as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Pilot Class:", "{F81414}Abilities:\n{FFFFFF}A Airforce class, Very Good in Air. Can drive Hunter, Hydra & Sea Sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Tear Gas\n{FFFFFF}Shotgun\n{FFFFFF}9mm", "OK","");
                            gPlayerClass[playerid] = PILOT;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 22, 300);
                            GivePlayerWeapon(playerid, 24, 400);
                            GivePlayerWeapon(playerid, 17, 4);
                            GivePlayerWeapon(playerid, 25, 200);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 8 to get this Class.");
                            ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                            TogglePlayerControllable(playerid, 0);
                            return 1;
                        }
                    }
                }
            }
        }
    }
    return 0;
}
Reply
#7

I put this Under This:

pawn Код:
CMD:sc(playerid,parmas[])
    {
    #pragma unused params
    return ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 6)  \nPilot Class  (Need Rank 7) ", "Choose","");
    }

//In OnDialogResponse
forward OnDialogResponses(playerid, dialogid, response, listitem, inputtext[]);

public OnDialogResponses(playerid, dialogid, response, listitem, inputtext[])
{
    switch (dialogid)
    {
        case 999:
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0:
                    {
                        if(GetPlayerScore(playerid) >= 0)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Assault as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Assult Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, good in infantry attacks.\n\n{F81414}Weapons:\n\n{FFFFFF}Knife\n{FFFFFF}M4\n{FFFFFF}Spaz12\n{FFFFFF}Deagle", "OK","");
                            gPlayerClass[playerid] = ASSAULT;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 4, 1);
                            GivePlayerWeapon(playerid, 27, 500);
                            GivePlayerWeapon(playerid, 24, 500);
                            GivePlayerWeapon(playerid, 31, 700);
                            return 1;
                        }
                    }
                    case 1:
                    {
                        if(GetPlayerScore(playerid) >= 250)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: 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}Rifle\n{FFFFFF}Knife\n{FFFFFF}Shotgun", "OK","");
                            gPlayerClass[playerid] = SNIPER;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            if(gTeam[playerid] == TEAM_PAKISTAN)    SetPlayerColor(playerid,0x008000AA);
                            else if(gTeam[playerid] ==TEAM_GERMANY) SetPlayerColor(playerid,0xFF8000AA);
                            else if(gTeam[playerid] ==TEAM_USA)     SetPlayerColor(playerid,0x0080FFAA);
                            else if(gTeam[playerid] ==TEAM_RUSSIA)  SetPlayerColor(playerid,0xFF0000AA);
                            else if(gTeam[playerid] ==TEAM_INDIA)   SetPlayerColor(playerid,0xFFFF00AA);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 4, 1);
                            GivePlayerWeapon(playerid, 34, 400);
                            GivePlayerWeapon(playerid, 25, 200);
                            GivePlayerWeapon(playerid, 33, 300);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid,COLOR_RED,"You need to be on Rank 2 to get this Class.");
                            ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                            TogglePlayerControllable(playerid, 0);
                            return 1;
                        }
                    }
                    case 2:
                    {
                        if(GetPlayerScore(playerid) >= 400)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Medic as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Medic Class:", "{F81414}Abilities:\n{FFFFFF}A Strong class. Very good on land\nCan heal themselve using /usekit cmd.\n\n{F81414}Weapons:\n\n{FFFFFF}Spas12\n{FFFFFF}Silent Pistol\n{FFFFFF}RPG\n{FFFFFF}Desert Eagle", "OK","");
                            gPlayerClass[playerid] = MEDIC;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 27, 400);
                            GivePlayerWeapon(playerid, 23, 400);
                            GivePlayerWeapon(playerid, 35, 2);
                            GivePlayerWeapon(playerid, 24, 300);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 3 to get this Class.");
                            ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                            TogglePlayerControllable(playerid, 0);
                            return 1;
                        }
                    }
                    case 3:
                    {
                        if(GetPlayerScore(playerid) >= 600)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Engineer as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Engineer Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, can drice tanks.\n\n{F81414}Weapons:\n\n{FFFFFF}Tec-9\n{FFFFFF}Colt\n{FFFFFF}Knife\n{FFFFFF}Moltov", "OK","");
                            gPlayerClass[playerid] = ENGINEER;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 4, 1);
                            GivePlayerWeapon(playerid, 32, 1000);
                            GivePlayerWeapon(playerid, 22, 700);
                            GivePlayerWeapon(playerid, 18, 2);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 4 to get this Class.");
                            ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                            TogglePlayerControllable(playerid, 0);
                            return 1;
                        }
                    }
                    case 4:
                    {
                        if(GetPlayerScore(playerid) >= 800)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Mercenary as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Mercenary Class Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, can fly sea sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Tec-9\n{FFFFFF}Colt\n{FFFFFF}Knife\n{FFFFFF}Moltov", "OK","");
                            gPlayerClass[playerid] = MERCENARY;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 4, 1);
                            GivePlayerWeapon(playerid, 32, 2000);
                            GivePlayerWeapon(playerid, 22, 700);
                            GivePlayerWeapon(playerid, 18, 2);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 5 to get this Class.");
                            ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                            TogglePlayerControllable(playerid, 0);
                            return 1;
                        }
                    }
                    case 5:
                    {
                        if(GetPlayerScore(playerid) >= 1500)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Jet Trooper as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Jet Trooper Class:", "{F81414}Abilities:\n{FFFFFF}A Airforce class, Very Good in Air. Can drive Hunter, Hydra & Sea Sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Tear Gas\n{FFFFFF}Shotgun\n{FFFFFF}9mm", "OK","");
                            gPlayerClass[playerid] = JETTROOPER;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 22, 300);
                            GivePlayerWeapon(playerid, 24, 400);
                            GivePlayerWeapon(playerid, 17, 4);
                            GivePlayerWeapon(playerid, 25, 200);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 7 to get this Class.");
                            ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                            TogglePlayerControllable(playerid, 0);
                            return 1;
                        }
                    }
                    case 6:
                    {
                        if(GetPlayerScore(playerid) >= 2000)
                        {
                            SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Pilot as your class.");
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Pilot Class:", "{F81414}Abilities:\n{FFFFFF}A Airforce class, Very Good in Air. Can drive Hunter, Hydra & Sea Sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Tear Gas\n{FFFFFF}Shotgun\n{FFFFFF}9mm", "OK","");
                            gPlayerClass[playerid] = PILOT;
                            PickedClass[playerid] = 1;
                            SetPlayerVirtualWorld(playerid, 0);
                            TogglePlayerControllable(playerid, 1);
                            GivePlayerWeapon(playerid, 22, 300);
                            GivePlayerWeapon(playerid, 24, 400);
                            GivePlayerWeapon(playerid, 17, 4);
                            GivePlayerWeapon(playerid, 25, 200);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 8 to get this Class.");
                            ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");
                            TogglePlayerControllable(playerid, 0);
                            return 1;
                        }
                    }
                }
            }
        }
    }
    return 0;
}
ResetPlayerWeapons(playerid);
}
it is giving These Errors:

pawn Код:
D:\Games\UDCWAR~1\GAMEMO~1\Wars.pwn(1298) : error 017: undefined symbol "params"
D:\Games\UDCWAR~1\GAMEMO~1\Wars.pwn(1487) : error 021: symbol already defined: "ResetPlayerWeapons"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Reply
#8

you need to define params
and you only define ResetPlayerWeapons for one time not again
Reply
#9

how can i define parmas?
Reply
#10

are you using YCMD/DCMD?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)