Have I misplaced a bracket or something?
#1

I'm having an issue with a command I wrote, whenever I type /medicuniform at the uniform spot it says "You are not part of the SD-EMS", but it should allow me to equip the uniforms...

pawn Код:
CMD:medicuniformtest(playerid, params[])
{
    if(PlayerInfo[playerid][pMember] == 3)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You are not a part of SD-EMS!!");
        return 1;
    }
    else if(!OnMedicDuty[playerid])
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You are not on duty!");
        return 1;
    }
    else if(!IsPlayerInRangeOfPoint(playerid, 3.0, 255.3,77.4,1003.6) && !IsPlayerInRangeOfPoint(playerid, 3.0, -1616.1294,681.1594,7.1875) && !IsPlayerInRangeOfPoint(playerid, 10.0, 228.40, 111.00, 1003.21))
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You are not in the locker room!");
        return 1;
    }
    new skin;
    new string[128];
    if(PlayerInfo[playerid][pMember] == 3)
    {
        if(!sscanf(params, "i", skin))
        {
            switch(skin)
            {
                case 0:
                {
                    format(string,sizeof(string), "* %s puts %s medical uniform back in the locker.", PlayerNameEx(playerid), HisHer(playerid));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
                }
                case 1:
                {
                    SetPlayerSkin(playerid, 280);
                    format(string, sizeof(string), "* %s gets on a medical uniform.", PlayerNameEx(playerid));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    return 1;
                }
                case 2:
                {
                    SetPlayerSkin(playerid, 280);
                    format(string, sizeof(string), "* %s gets on a medical uniform.", PlayerNameEx(playerid));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    return 1;
                }
                case 3:
                {
                    SetPlayerSkin(playerid, 280);
                    format(string, sizeof(string), "* %s gets on a medical uniform.", PlayerNameEx(playerid));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    return 1;
                }
                default:
                {
                    SendClientMessage(playerid, COLOR_LIGHTRED, "   Invalid uniform!");
                    return 1;
                }
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "USAGE: /Uniform [Uniform ID]");
            SendClientMessage(playerid, COLOR_YELLOW, "_________Uniform List_________");
            SendClientMessage(playerid, COLOR_WHITE, "0: No Uniform");
            SendClientMessage(playerid, COLOR_WHITE, "1: Medic Uniform 1");
            SendClientMessage(playerid, COLOR_WHITE, "2: Medic Uniform 2");
            SendClientMessage(playerid, COLOR_WHITE, "3: Medic Uniform 3");
            return 1;
        }
    }
    return 1;
}
Reply


Messages In This Thread
Have I misplaced a bracket or something? - by Luke_James - 13.08.2012, 14:19
Re: Have I misplaced a bracket or something? - by Snipa - 13.08.2012, 14:34
Re: Have I misplaced a bracket or something? - by Luke_James - 13.08.2012, 20:07
Re: Have I misplaced a bracket or something? - by Weaselpwns - 13.08.2012, 20:13
Re: Have I misplaced a bracket or something? - by SEnergy - 13.08.2012, 20:14
Re: Have I misplaced a bracket or something? - by Luke_James - 13.08.2012, 20:35
Re: Have I misplaced a bracket or something? - by SEnergy - 13.08.2012, 20:37

Forum Jump:


Users browsing this thread: 6 Guest(s)