Need some help with if, else if or else
#3

pawn Код:
case DIALOG_SNIPER:
{
    if( response )
    {
        if(GetPlayerScore(playerid) <= 5)
        {
            echo(playerid,COLOR_DARKRED,"You must have atleast Rank 2 to be a Sniper! ");
            ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Select your Class 3/4", "{00CC33}Assault \n{00CC33}Sniper \n{00CC33}Medic \n{00CC33}Flame Thrower \n{00CC33}Pilot \n{00CC33}Engineer \n{00CC33}Spy \n{00CC33}Scout ", "Continue", "Back");
            return 1;
        }
        gPlayerClass[playerid] = SNIPER_CLASS;
        GivePlayerWeapon(playerid, 4, 1);//knife
        GivePlayerWeapon(playerid, 22, 15);//9mm
        GivePlayerWeapon(playerid, 25, 25);//shotgun
        GivePlayerWeapon(playerid, 44, 1);//night vision goggles
        GivePlayerWeapon(playerid, 41, 43);//spraycan
        SetPlayerHealth(playerid, 75);
        return 1;
    }
    else return ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Select your Class 3/4", "{00CC33}Assault \n{00CC33}Sniper \n{00CC33}Medic \n{00CC33}Flame Thrower \n{00CC33}Pilot \n{00CC33}Engineer \n{00CC33}Spy \n{00CC33}Scout ", "Continue", "Back");
}
Do you see what is changed?
Reply


Messages In This Thread
Need some help with if, else if or else - by MSI - 31.01.2012, 13:30
Re: Need some help with if, else if or else - by milanosie - 31.01.2012, 13:36
Re: Need some help with if, else if or else - by Jochemd - 31.01.2012, 13:37
Re: Need some help with if, else if or else - by MSI - 31.01.2012, 13:38
Re: Need some help with if, else if or else - by [ABK]Antonio - 31.01.2012, 13:43

Forum Jump:


Users browsing this thread: 4 Guest(s)