Help With Skins!!
#1

Hello, I need some help making it so the skin selection only appears on a players first login, meaning the server must remember a players skin when they disconnect. Also does anyone know how to make on of those server tutorials or guides for first time players on the server?
Reply
#2

just save the skin id to a ini file using y_ini or the likes.

then on player spawn set there skin.
Reply
#3

pawn Код:
new bool:Forced[MAX_PLAYERS]=false;

public OnPlayerRequestClass(playerid, classid)
{
    if(!Forced[playerid]) SpawnPlayer(playerid);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(!Forced[playerid])
    {
        if(dini_Exists("Skins.ini"))
        {
            new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME);
            SetPlayerSkin(playerid, dini_Int("Skins.ini", name));
        }
    }
    if(Forced[playerid])
    {
        if(!dini_Exists("Skins.ini")) dini_Create("Skins.ini");
        new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME);
        dini_IntSet("Skins.ini", name, GetPlayerSkin(playerid));
    }
    return 1;
}
In the login command use
pawn Код:
ForcePlayerToClassSelection(playerid);
Forced[playerid]=true;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)