Help With Skins!!
#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


Messages In This Thread
Help With Skins!! - by Finn707 - 17.02.2012, 12:30
Re: Help With Skins!! - by Madd Kat - 17.02.2012, 12:45
Re: Help With Skins!! - by TheGamer! - 17.02.2012, 12:54

Forum Jump:


Users browsing this thread: 1 Guest(s)