Refreshing files?
#1

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?
Reply
#2

What do you mean 'refresh' his account?
Reply
#3

Restart the Server...
Reply
#4

Yes exactly, I don't want to restart the server, I just want to type a command that updates the user's file, so I won't restart it .
Reply
#5

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();
}
Reply
#6

Oh, thank you, I will be checking it -- Just making another thread to see why my "/ann cmd" doesn't send a full message
Reply
#7

What command is suppose to be "/ann" ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)