HELP FAST
#1

Hello.
Can someone do auto-save for me ? I mean auto-save OnPlayerDisconnect:



Код:
    dUserSetINT(PlayerName(playerid)).("Money",GetPlayerMoney(playerid));
		dUserSetINT(PlayerName(playerid)).("Bankcash",BankCash[playerid]);
		dUserSetINT(PlayerName(playerid)).("Score",GetPlayerScore(playerid));
		dUserSetINT(PlayerName(playerid)).("Adminlevel",AdminLevel[playerid]);
		dUserSetINT(PlayerName(playerid)).("Helperlevel",HelperLevel[playerid]);
		dUserSetINT(PlayerName(playerid)).("VIP",IsVIP[playerid]);
		dUserSetINT(PlayerName(playerid)).("HasPins",HasBP[playerid]);
		dUserSetINT(PlayerName(playerid)).("MMs",HasMM[playerid]);
		dUserSetINT(PlayerName(playerid)).("Scissors",HasScissors[playerid]);
		dUserSetINT(PlayerName(playerid)).("Ropes",HasRope[playerid]);
		dUserSetINT(PlayerName(playerid)).("ButtPlugs",BP[playerid]);
		dUserSetINT(PlayerName(playerid)).("WantedLevel",GetPlayerWantedLevel(playerid));
		dUserSetINT(PlayerName(playerid)).("SavedJailTime",JailTime[playerid]);
		dUserSetINT(PlayerName(playerid)).("XP",PlayerXP[playerid]);
		dUserSetINT(PlayerName(playerid)).("HitMoney",HitMoney[playerid]);
		dUserSetINT(PlayerName(playerid)).("IP",GetPlayerIp(playerid,ip,50));
		dUserSetINT(PlayerName(playerid)).("Arrests",Arrests[playerid]);
		dUserSetINT(PlayerName(playerid)).("Robberies",Robberies[playerid]);
		dUserSetINT(PlayerName(playerid)).("Kills",Kills[playerid]);
		dUserSetINT(PlayerName(playerid)).("Deaths",Deaths[playerid]);
		dUserSetINT(PlayerName(playerid)).("C4s",HasC4[playerid]);
Reply
#2

Make a stock for it.
Reply
#3

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
Make a stock for it.
Can someone make a stock for me please ?!
Reply
#4

pawn Код:
stock SavePlayerdata(playerid)
{
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    dUserSetINT(PlayerName(playerid)).("Money",GetPlayerMoney(playerid));
    dUserSetINT(PlayerName(playerid)).("Bankcash",BankCash[playerid]);
    dUserSetINT(PlayerName(playerid)).("Score",GetPlayerScore(playerid));
    dUserSetINT(PlayerName(playerid)).("Adminlevel",AdminLevel[playerid]);
    dUserSetINT(PlayerName(playerid)).("Helperlevel",HelperLevel[playerid]);
    dUserSetINT(PlayerName(playerid)).("VIP",IsVIP[playerid]);
    dUserSetINT(PlayerName(playerid)).("HasPins",HasBP[playerid]);
    dUserSetINT(PlayerName(playerid)).("MMs",HasMM[playerid]);
    dUserSetINT(PlayerName(playerid)).("Scissors",HasScissors[playerid]);
    dUserSetINT(PlayerName(playerid)).("Ropes",HasRope[playerid]);
    dUserSetINT(PlayerName(playerid)).("ButtPlugs",BP[playerid]);
    dUserSetINT(PlayerName(playerid)).("WantedLevel",GetPlayerWantedLevel(playerid));
    dUserSetINT(PlayerName(playerid)).("SavedJailTime",JailTime[playerid]);
    dUserSetINT(PlayerName(playerid)).("XP",PlayerXP[playerid]);
    dUserSetINT(PlayerName(playerid)).("HitMoney",HitMoney[playerid]);
    dUserSetINT(PlayerName(playerid)).("IP",GetPlayerIp(playerid,ip,50));
    dUserSetINT(PlayerName(playerid)).("Arrests",Arrests[playerid]);
    dUserSetINT(PlayerName(playerid)).("Robberies",Robberies[playerid]);
    dUserSetINT(PlayerName(playerid)).("Kills",Kills[playerid]);
    dUserSetINT(PlayerName(playerid)).("Deaths",Deaths[playerid]);
    dUserSetINT(PlayerName(playerid)).("C4s",HasC4[playerid]);
}
pawn Код:
SavePlayerdata(playerid); //use this in OnPlayerDisconnect callback but this wont check if the player is logged in or not
Reply
#5

Fixed.
Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)