How to add skin
#1

I have a roleplay server.I tried /setskin 0 i put the new skin id>>>example:/setskin 0 5(new skin)
Its says invalid skin.How can i add it to my server pack.I have 0.3d R2 server and it say Invalid Skin!.
Pm me and help me add it to my GM.Not
pawn Код:
AddPlayerClass
Reply
#2

Update your server to 0.3d. Because when you update then you can use new skins!
Reply
#3

already lol.
Reply
#4

AAa sorry i watch that is a 0.3c... my bad... Mby you show the CMD ??
Reply
#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
#6

Is this the problem?
pawn Код:
// Player Class's
    for(new i = 0; i <= sizeof(PedSkins)-1; i++)
    {
      AddPlayerClass(PedSkins[i][0],982.1890,-1624.2583,14.952,90,-1,-1,-1,-1,-1,-1);
    }
Reply
#7

Mmm mby yes just copy compile and test
Reply
#8

Why do you copy things out of the Godfather? These are really, REALLY inefficient! There are much better methods available, such as ZCMD + sscanf (a great combination).

pawn Код:
CMD:setskin(playerid,params[])
{
    new giveplayerid,skin;
    if(!sscanf(params,"ud",giveplayerid,skin))
    {
        if(skin < 0 || skin > 299) return SendClientMessage(playerid, COLOR_GREY, "   Skin can't be below 0 or above 299 !");
        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);
            return 1;
        }
        else return SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
    }
    else return SendClientMessage(playerid,COLOR_GRAD1,"Usage: /setskin [ID].");
}
I can only recommend you to use this, then it might work! Do you see the difference between Godfather code and this one I made out of this code for you?
Reply
#9

THat is not GF..lol...btw i dont realize if it is GF cuz its my friend work..he make the script for me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)