[HELP] Skin System!
#2

pawn Код:
if(strcmp(cmd, "/clothes", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsAtClothShop(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_WHITE,"USAGE: /clothes [Skin ID]");
                    return 1;
                }
                new level = strval(tmp);
                if(PlayerInfo[playerid][pSex] == 1)
                {
                    if(level == femaleskin1 || level == femaleskin2) // add more female skins in femalesskin1/2 or add more || level
                    {
                        SendClientMessage(COLOR_CREAM, "Your gender cannot buy those skins.");
                        return 1;
                    }
                }
                else if(PlayerInfo[playerid][pSex] == 2)
                {
                    if(level == maleskin1 || level == maleskin2) // add more male skins in malesskin1/2 or add more || level
                    {
                        SendClientMessage(COLOR_CREAM, "Your gender cannot buy those skins.");
                        return 1;
                    }
                }
                else if(level == 0 || level == 70 || level == 71 || level == 147 || level == 163 || level == 164 || level == 165 || level == 211 || level == 252 || level == 265 || level == 266 || level == 266 || level == 267 || level >= 274 && level <= 288)
                {
                    SendClientMessage(playerid , COLOR_GRAD2, "That skin is not allowed !");
                    return 1;
                }
                GivePlayerMoney(playerid,-150);
                SafeGivePlayerMoney(playerid, - 150);
                if(!IsValidSkin(level))
                return SendClientMessage(playerid, COLOR_GREY, "Wrong skin ID!");
                PlayerInfo[playerid][pModel] = level;
                SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
            }
        }
        return 1;
    }
Reply


Messages In This Thread
[HELP] Skin System! - by McCurdy - 18.07.2012, 13:13
Re: [HELP] Skin System! - by L.Hudson - 18.07.2012, 14:08
Re: [HELP] Skin System! - by McCurdy - 18.07.2012, 14:35
Re: [HELP] Skin System! - by McCurdy - 19.07.2012, 05:32
Re: [HELP] Skin System! - by Jstylezzz - 19.07.2012, 11:58
Re: [HELP] Skin System! - by McCurdy - 19.07.2012, 12:09
Re: [HELP] Skin System! - by McCurdy - 21.07.2012, 05:11
Re: [HELP] Skin System! - by Kindred - 21.07.2012, 05:50
Re: [HELP] Skin System! - by McCurdy - 21.07.2012, 05:52
Re: [HELP] Skin System! - by McCurdy - 21.07.2012, 13:56

Forum Jump:


Users browsing this thread: 1 Guest(s)