How can i make permission skin?
#1

Hi i need help like a script or example on how to lock a skin like i want to skin swat id 285 to be like apply on forum

i is for a cops and robber script i am making take me over a year now i am making the final hits
i need to skin permissions please help.
Reply
#2

Where do you select the skin, through OnPlayerRequestClass and so forth? Or do you have a command to switch your skin.
Reply
#3

I Use onPlayerRequestClass
Reply
#4

Something like this should work, yet you need to make the variables and such if you haven't

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(GetPlayerSkin(playerid) == skinidhere && PlayerInfo[playerid][pMember] != 1) //If the member is not value 1, and if they have a specific skin, and it continues.
    {
        SendClientMessage(playerid, 0xFF0000FF, "Restricted Skin!");
        return 0;
    }
    return 1;
}
Change variables to your variable as-well.
Reply
#5

thanks and would i be able to give them permission?
Reply
#6

it dint work
Reply
#7

Yes, you could give them permission. This is an example:

pawn Код:
CMD:makemember(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminLevel] >= 5)
    {
        new targetid, faction, string[128];
        if(sscanf(params, "ui", targetid, faction))
        {
            return SendClientMessageEx(playerid, COLOR_GRAY, "Usage: /makemember <playerid> <1: LSPD, 2: LSFMD>");
        }
        else if(!IsPlayerConnected(targetid)) return SendClientMessageEx(playerid, COLOR_GRAY, "Invalid player specified.");
        else if(faction < 1 || faction > 2) return SendClientMessageEx(playerid, COLOR_GRAY, "Usage: /makemember <playerid> <1: LSPD, 2: LSFMD>");
        PlayerInfo[targetid][pFaction] = faction;
        PlayerInfo[targetid][pRank] = 1;
        PlayerInfo[targetid][pFamily] = 0;
        SetPlayerStatInt(targetid, "CHARACTER", "faction", PlayerInfo[targetid][pFaction]);
        SetPlayerStatInt(targetid, "CHARACTER", "rank", PlayerInfo[targetid][pRank]);
        SetPlayerStatInt(targetid, "CHARACTER", "family", PlayerInfo[targetid][pFamily]);
       
        new File:paylog = fopen("logs/faction.log", io_append);
        format(string, sizeof(string), "[%s]: %s has set %s's as the leader of the faction.\n", GetFactionName(PlayerInfo[targetid][pFaction]), GetRPName(playerid), GetRPName(targetid));
        fwrite(paylog, string);
        fclose(paylog);
       
        format(string, sizeof(string), "You were made a member of the %s by %s", GetFactionName(PlayerInfo[targetid][pFaction]), GetRPName(playerid));
        SendClientMessageEx(targetid, COLOR_YELLOW, string);
        format(string, sizeof(string), "You have made %s a member of %s!", GetRPName(targetid), GetFactionName(PlayerInfo[targetid][pFaction]));
        return SendClientMessageEx(playerid, COLOR_ORANGE, string);
    }
    return 1;
}
My own personnel /makemember command, although it uses different variables, you could switch the stuff yourself. Uses sscanf and zcmd.

What do you mean it didn't work? Did you change the variables and such?
Reply
#8

this si not what i am looking for
i was looking for like to give permission to some one to use a skin
but thanks anyways buddy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)