17.02.2012, 12:54
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;
}
pawn Код:
ForcePlayerToClassSelection(playerid);
Forced[playerid]=true;