How to add skin
#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


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)