Posts: 357
Threads: 52
Joined: Feb 2012
Reputation:
0
Hello guys,
I'm using y_ini for saving accounts, now I want to change the money from the file of a player's account in scriptfiles, but after the change I want to refresh his account, how can I do this?
Posts: 1,274
Threads: 54
Joined: Jul 2012
What do you mean 'refresh' his account?
Posts: 1,274
Threads: 54
Joined: Jul 2012
This is my code :
Код:
CMD:savechars(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 4) {
SaveEventPoints();
SaveAccountsUpdate();
SaveHouses();
SendClientMessageEx(playerid, COLOR_YELLOW, "All player accounts updated successfully.");
}
else {
SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use that command!");
}
return 1;
Here is the Timer Code for it though,
Код:
// Timer Name: SaveAccountsUpdate()
// TickRate: 5 Minutes.
Timer:SaveAccountsUpdate[300000]()
{
new playerip[32];
foreach(Player, i)
{
PlayerInfo[i][pInt] = GetPlayerInterior(i);
PlayerInfo[i][pVW] = GetPlayerVirtualWorld(i);
PlayerInfo[i][pChar] = PlayerInfo[i][pModel];
GetPlayerIp(i, playerip, sizeof(playerip));
format(PlayerInfo[i][pIP], 32, "%s", playerip);
GetPlayerPos(i, PlayerInfo[i][pPos_x], PlayerInfo[i][pPos_y], PlayerInfo[i][pPos_z]);
GetPlayerFacingAngle(i, PlayerInfo[i][pPos_r]);
OnPlayerStatsUpdate(i);
}
SaveFamilies();
SaveFamiliesHQ();
}
Posts: 357
Threads: 52
Joined: Feb 2012
Reputation:
0
Oh, thank you, I will be checking it -- Just making another thread to see why my "/ann cmd" doesn't send a full message
Posts: 1,274
Threads: 54
Joined: Jul 2012
What command is suppose to be "/ann" ?