12.09.2012, 14:46
How can I make a common /skin command with saving system? I have already made this.
I only need a dcmd skin command that will get player skin Id. And after they leave, and connect again after they spawn the last skin that they have choose must be their skin.
I only need a dcmd skin command that will get player skin Id. And after they leave, and connect again after they spawn the last skin that they have choose must be their skin.
pawn Код:
enum PlayerData
{
Skin,
//other
pawn Код:
OnPlayerConnect
{
AccInfo[playerid][Skin] = 0;
//other
}
pawn Код:
dcmd_cmd_Register
{
dUserSetINT(PlayerName2(playerid)).("Skin",0);
///other
}
pawn Код:
dcmd_stats
{
format(str, sizeof(str), "%sSkinID: %d\n", str, GetPlayerSkin(player1));
///other
}
pawn Код:
LoginPlayer
{
AccInfo[playerid][Kills] = (dUserINT(PlayerName2(playerid)).("Skin"));
}
//other
pawn Код:
Dialog Register
dUserSetINT(PlayerName2(playerid)).("Skin",0);
//other
pawn Код:
Error Password
dUserSetINT(PlayerName2(playerid)).("Skin",0);
//other
pawn Код:
SavePlayerStats
dUserSetINT(PlayerName2(playerid)).("Skin",AccInfo[playerid][Skin]);
//other