03.12.2011, 12:30
Hello,
I've successfuly made skin saving system in my registration system which is using y_ini that I learned it from Kush's tutorial. So, the skin saves in the data file( Playername.ini ), but my problem now is I am facing this problem on player connect, it shows the Class selection and I have no idea how to make it actually load the skin that a player has(saved in his data file). That's the ideas I came up with but they didn't work:
Putting that under OnGameModeInIt and on the class selection function. But it seems that it doesn't work and I know it doesn't make sense too, lol. But unfortunatley, I didn't have any other idea on how to make it load, If you want the code just tell me which one should I post.
P.S, Here is the other idea that I came up with but it didn't work too,
And I am still learning so, I hope I don't face meany replies :'3.
EDIT: I've put this
Under OnPlayerSpawn, but it didn't work too. Maybe it's because the " Spawn " button at the first screen when you join a server? How to disable it?
EDIT 2: I've found a code that skips the Player class selection window, but the skin still is not loading, I used this code to skip the Class selection:
I've successfuly made skin saving system in my registration system which is using y_ini that I learned it from Kush's tutorial. So, the skin saves in the data file( Playername.ini ), but my problem now is I am facing this problem on player connect, it shows the Class selection and I have no idea how to make it actually load the skin that a player has(saved in his data file). That's the ideas I came up with but they didn't work:
pawn Код:
AddPlayerClass(GetPlayerSkin(i), xspawn, yspawn, zspawn, aspawn, 0, 0, 0, 0, 0, 0);
P.S, Here is the other idea that I came up with but it didn't work too,
pawn Код:
public OnPlayerSpawn(playerid)
{
GetPlayerSkin(playerid);
return 1;
}
EDIT: I've put this
pawn Код:
SetPlayerSkin(playerid,GetPlayerSkin(playerid));
EDIT 2: I've found a code that skips the Player class selection window, but the skin still is not loading, I used this code to skip the Class selection:
pawn Код:
forward SpawnPlaya(playerid);
public OnPlayerRequestClass(playerid, classid)
{
SetTimerEx("SpawnPlaya", 10, false, "i", playerid);
return 1;
}
public SpawnPlaya(playerid)
{
SpawnPlayer(playerid);
}