Save skin help
#9

pawn Код:
CMD:saveskin(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 1 && PlayerInfo[playerid][LoggedIn] == 1) {
        if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /saveskin [skinid]");
        new string[128], SkinID = strval(params);
        if((SkinID == 0)||(SkinID == 7)||(SkinID >= 9 && SkinID <= 41)||(SkinID >= 43 && SkinID <= 64)||(SkinID >= 66 && SkinID <= 73)||(SkinID >= 75 && SkinID <= 85)||(SkinID >= 87 && SkinID <= 118)||(SkinID >= 120 && SkinID <= 148)||(SkinID >= 150 && SkinID <= 207)||(SkinID >= 209 && SkinID <= 264)||(SkinID >= 274 && SkinID <= 288)||(SkinID >= 290 && SkinID <= 299))
        {
            dUserSetINT(PlayerName2(playerid)).("FavSkin",SkinID);
            format(string, sizeof(string), "You have successfully saved this skin (ID %d)",SkinID);
            SendClientMessage(playerid,yellow,string);
            SendClientMessage(playerid,yellow,"Type: /useskin to use this skin when you spawn or /dontuseskin to stop using skin");
            dUserSetINT(PlayerName2(playerid)).("UseSkin",1);
            return CMDMessageToAdmins(playerid,"SAVESKIN");
        } else return SendClientMessage(playerid, green, "ERROR: Invalid Skin ID");
    } else return SendClientMessage(playerid,red,"ERROR: You must be an administrator to use this command");
}

CMD:useskin(playerid,params[]) {
    #pragma unused params
    if(PlayerInfo[playerid][Level] >= 1 && PlayerInfo[playerid][LoggedIn] == 1) {
        dUserSetINT(PlayerName2(playerid)).("UseSkin",1);
        SetPlayerSkin(playerid,dUserINT(PlayerName2(playerid)).("FavSkin"));
        return SendClientMessage(playerid,yellow,"Skin now in use");
    } else return SendClientMessage(playerid,red,"ERROR: You must be an administrator to use this command");
}

CMD:dontuseskin(playerid,params[]) {
    #pragma unused params
    if(PlayerInfo[playerid][Level] >= 1 && PlayerInfo[playerid][LoggedIn] == 1) {
        dUserSetINT(PlayerName2(playerid)).("UseSkin",0);
        return SendClientMessage(playerid,yellow,"Skin will no longer be used");
    } else return SendClientMessage(playerid,red,"ERROR: You must be an administrator to use this command");
}
i took them from admin system xD
Reply


Messages In This Thread
Save skin help - by mickos - 13.08.2012, 19:13
Re: Save skin help - by TaLhA XIV - 13.08.2012, 19:15
Re: Save skin help - by mickos - 13.08.2012, 19:17
Re: Save skin help - by TaLhA XIV - 13.08.2012, 19:20
Re: Save skin help - by mickos - 13.08.2012, 19:23
Re: Save skin help - by TaLhA XIV - 13.08.2012, 19:28
Re: Save skin help - by mickos - 13.08.2012, 19:35
Re: Save skin help - by TaLhA XIV - 13.08.2012, 19:38
Re: Save skin help - by DarkB0y - 13.08.2012, 19:43
Re: Save skin help - by mickos - 13.08.2012, 19:51

Forum Jump:


Users browsing this thread: 1 Guest(s)