[HELP] Clothes
#2

pawn Код:
if(strcmp(cmd, "/clothes", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /clothes [skin id]");
            return 1;
        }
        new level;
        level = strval(tmp);
        if(level > 299 || level < 1)
        {
            SendClientMessage(playerid, COLOR_GREY, "Wrong skin ID!");
            return 1;
        }
        if(IsAtClothShop(playerid))
        {
            PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0);
            SafeGivePlayerMoney(playerid, -50);
            SendClientMessage(playerid, COLOR_WHITE, " * Your skin has been changed!");
            PlayerInfo[playerid][pChar] = level;
            GameTextForPlayer(playerid, "~w~Skin purchased", 5000, 1);
            SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
        }
        else
        {
            SendClientMessage(playerid, COLOR_GRAD1, " You are not at the clothes shop!");
        }
    }
    return 1;
}
Reply


Messages In This Thread
[HELP] Clothes - by joeri55 - 20.12.2009, 09:50
Re: [HELP] Clothes - by Marcel - 20.12.2009, 09:54
Re: [HELP] Clothes - by joeri55 - 20.12.2009, 10:16
Re: [HELP] Clothes - by Marcel - 20.12.2009, 10:20

Forum Jump:


Users browsing this thread: 2 Guest(s)