dUserSetINT(PlayerName(i)).("Score", GetPlayerScore(i));
if(udb_Create(PlayerName(playerid),inputtext))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have registerd. Your stats will save when you leave the game.");
LogPlayer(playerid);
PLAYERLIST_authed[playerid] = true;
dUserSetINT(PlayerName(playerid)).("Score", 0);
dUserSetINT(PlayerName(playerid)).("Cash", 1500);
dUserSetINT(PlayerName(playerid)).("BankCash", 5000);
dUserSetINT(PlayerName(playerid)).("AdminLevel", 0);
dUserSetINT(PlayerName(playerid)).("Banned", 0);
dUserSetINT(PlayerName(playerid)).("WantedLevel", 0);
dUserSetINT(PlayerName(playerid)).("Warnings", 0);
dUserSetINT(PlayerName(playerid)).("PackCash", 0);
dUserSetINT(PlayerName(playerid)).("ArmyPermission", 0);
dUserSetINT(PlayerName(playerid)).("PackPot", 0);
dUserSetINT(PlayerName(playerid)).("PackPipe", 0);
dUserSetINT(PlayerName(playerid)).("PackCondom", 0);
dUserSetINT(PlayerName(playerid)).("PackSnack", 0);
dUserSetINT(PlayerName(playerid)).("PackWallet", 0);
dUserSetINT(PlayerName(playerid)).("PackExp", 0);
dUserSetINT(PlayerName(playerid)).("HasPack", 0);
dUserSetINT(PlayerName(playerid)).("RobSkill", 0);
dUserSetINT(PlayerName(playerid)).("TerrorSkill", 0);
new pIP[16]; GetPlayerIp(playerid, pIP, 16);
dUserSet(PlayerName(playerid)).("IP", pIP);
}
return true;
}
return 1;
}//End of Register Dialog
if(udb_CheckLogin(PlayerName(playerid),inputtext))
{
SetPVarInt(playerid, "AdminLevel", dUserINT(PlayerName(playerid)).("AdminLevel"));
SetPVarInt(playerid, "Banned", dUserINT(PlayerName(playerid)).("Banned"));
SetPVarInt(playerid, "BankCash", dUserINT(PlayerName(playerid)).("BankCash"));
SetPVarInt(playerid, "Cash", dUserINT(PlayerName(playerid)).("Cash"));
SetPVarInt(playerid, "WantedLevel", dUserINT(PlayerName(playerid)).("WantedLevel"));
SetPVarInt(playerid, "HasPack", dUserINT(PlayerName(playerid)).("HasPack"));
SetPVarInt(playerid, "Warnings", dUserINT(PlayerName(playerid)).("Warnings"));
SetPVarInt(playerid, "PackCash", dUserINT(PlayerName(playerid)).("PackCash"));
SetPVarInt(playerid, "ArmyPermission", dUserINT(PlayerName(playerid)).("ArmyPermission"));
SetPVarInt(playerid, "PackPipe", dUserINT(PlayerName(playerid)).("PackPipe"));
SetPVarInt(playerid, "PackWallet", dUserINT(PlayerName(playerid)).("PackWallet"));
SetPVarInt(playerid, "PackCondom", dUserINT(PlayerName(playerid)).("PackCondom"));
SetPVarInt(playerid, "PackExp", dUserINT(PlayerName(playerid)).("PackExp"));
SetPVarInt(playerid, "PackSnack", dUserINT(PlayerName(playerid)).("PackSnack"));
SetPVarInt(playerid, "PackPot", dUserINT(PlayerName(playerid)).("PackPot"));
SetPVarInt(playerid, "JailTime", dUserINT(PlayerName(playerid)).("JailTime"));
SetPVarInt(playerid, "RobSkill", dUserINT(PlayerName(playerid)).("RobSkill"));
SetPVarInt(playerid, "Elite", dUserINT(PlayerName(playerid)).("Elite"));
SetPVarInt(playerid, "TerrorSkill", dUserINT(PlayerName(playerid)).("TerrorSkill"));
/*SetPVarInt(playerid, "HouseOnePerson", dUserINT(PlayerName(playerid)).("HouseOnePerson"));
SetPVarInt(palyerid, "HouseTwoPerson", dUserINT(PlayerName(playerid)).("HouseTwoPerson"));
SetPVarInt(playerid, "HouseThreePerson", dUserINT(PlayerName(playerid)).("HouseThreePerson"));
SetPVarInt(playerid, "HouseFourPerson", dUserINT(PlayerName(playerid)).("HouseFourPerson"));
SetPVarInt(playerid, "HouseFivePerson", dUserINT(PlayerName(playerid)).("HouseFivePerson"));
SetPVarInt(playerid, "HouseSixPerson", dUserINT(PlayerName(playerid))."HouseSixPerson"));*/
SetPlayerScore(playerid, dUserINT(PlayerName(playerid)).("Score"));
SetPlayerWantedLevel(playerid, GetPVarInt(playerid, "WantedLevel"));
GivePlayerMoney(playerid, GetPVarInt(playerid, "Cash"));
new pIP[16]; GetPlayerIp(playerid, pIP, 16);
dUserSet(PlayerName(playerid)).("IP", pIP);
PLAYERLIST_authed[playerid] = true;
SpawnPlayer(playerid);
return SendClientMessage(playerid, COLOR_LIGHTBLUE, "[INFO]: "COL_RWHITE"You are now logged in. Your stats will save when you leave the server.");
}
LogPlayer(playerid);
}
return 1;
}//End of Dialog
Simply copy one of those integer loads/saves and like SetPlayerScore and GivePlayerMoney, you'd do SetPlayerSkin. I would put that part in OnPlayerSpawn though.
|
SetPVarInt(playerid, "Skin", dUserINT(PlayerName(playerid)).("Skin"));
SetPlayerSkin(playerid, GetPVarInt(playerid, "Skin"));
so you mean like this
PHP код:
do this? PHP код:
|
Try it, do that code and see if it works. PS: Use [ pawn ] [ / pawn ] tags when you are typing in the pawn language, easier to see the comments etc.
That should work. And then you could make a command of /setskin which saves the result as the PVar for the Skin if you know what I mean. |
it dint work man i have a command /skin ill give me the skin 124 then i save stats and quite and join back but wont save it keep setting skin to 0 cj
|
dUserSetINT(PlayerName(playerid)).("Skin", /*your result here, the one that is given from the second parameter of SetPlayerSkin*/);
dUserSetINT(PlayerName(i)).("Skin",GetPlayerSkin(i));