Skin help with cmd REP +
#1

Hello This is my command hos can change it that when a player go /guarduty off his skin comes to be what he had last time instead off 101

pawn Код:
YCMD:guardduty(playerid, params[]) {

    if(isnull(params))
    return SendClientMessage(playerid, -1, "Type /guardduty [ON|OFF]");

    static
    playerName[MAX_PLAYER_NAME];
    if(PlayerInfo[playerid][SFCS] == 0) return 1;
    if(!strcmp(params, "ON", true)) {

        GetPlayerName(playerid, playerName, sizeof playerName);
        SetPVarString(playerid, "name", playerName);
        SetPlayerSkin(playerid,0);
        SetPlayerColor(playerid,0xFFA100FF);
        new string[126];
        format(string, sizeof(string), "%s changes his clothes for duty", PlayerName(playerid));
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        return 1;
    }
    if(!strcmp(params, "OFF", true)) {
       
        SetPlayerSkin(playerid,101);
        SetPlayerColor(playerid,0xFFFFFF00);
        new string[126];
        format(string, sizeof(string), "%s changes his clothes for going offduty", PlayerName(playerid));
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        return 1;
        }
    }
    return 1;
}
Reply
#2

Get the players skin, save it in enum then set the skin on gaurdduty off.
Reply
#3

Can you tell it in a better way its barely understandable.
pawn Код:
enum pInfo
{
    Password,
    Admin,
    Origin,
    Gender,
    Age,
    Float:sPosX,
    Float:sPosY,
    Float:sPosZ,
    Float:sPosA,
    Float:sHealth,
    Float:sArmor,
    Money,
    BankBalance,
    BankPin,
    Cellphone,
    HouseID,
    CarID,
    Gun1,
    Gun2,
    Gun3,
    Gun4,
    Gun5,
    Gun6,
    Gun7,
    Gun8,
    Gun9,
    Gun10,
    Gun11,
    Gun12,
    Gun13,
    WTChannel,
    Faction,
    FLeader,
    Job,
    sInterior,
    sVW,
    Skin,
    Muted,
    nMute,
    Helper,
    Developer,
    Wolf,
    SFCS,
    SFCMS,
    RentingID,
    FRank,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
My enum info
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)