How to add skin
#5

pawn Код:
if(strcmp(cmd, "/setskin", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setskin [playerid/PartOfName] [skin]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if(IsPlayerNPC(giveplayerid)) return 1;
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setskin [playerid/PartOfName] [skin]");
                return 1;
            }
            new skin;
            skin = strvalEx(tmp);
            if(skin < 0 || skin > 299) { SendClientMessage(playerid, COLOR_GREY, "   Skin can't be below 0 or above 299 !"); return 1; }
            if(IsInvalidSkin(skin)) { SendClientMessage(playerid, COLOR_GREY, "   Invalid Skin !"); return 1; }
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    if(PlayerInfo[playerid][pAdmin] >= 2)
                    {
                        PlayerInfo[giveplayerid][pModel] = skin;
                        SetPlayerSkin(giveplayerid, skin);
                        format(string, sizeof(string), "   That players Skin was set to %d !", skin);
                        SendClientMessage(playerid, COLOR_GRAD1, string);
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
                    }
                }
            }
            else
            {
                format(string, sizeof(string), "   %d is not an active player !", giveplayerid);
                SendClientMessage(playerid, COLOR_GRAD1, string);
            }
        }
        return 1;
    }
Reply


Messages In This Thread
How to add skin - by Tamao_Serizawa - 08.01.2012, 07:25
Re: How to add skin - by Aprezt - 08.01.2012, 07:27
Re: How to add skin - by Tamao_Serizawa - 08.01.2012, 07:28
Re: How to add skin - by Aprezt - 08.01.2012, 07:29
Re: How to add skin - by Tamao_Serizawa - 08.01.2012, 07:32
Re: How to add skin - by Tamao_Serizawa - 08.01.2012, 07:40
Re: How to add skin - by Aprezt - 08.01.2012, 07:51
Re: How to add skin - by Jochemd - 08.01.2012, 07:52
Re: How to add skin - by Tamao_Serizawa - 08.01.2012, 08:13

Forum Jump:


Users browsing this thread: 1 Guest(s)