01.04.2009, 17:42
Quote:
Originally Posted by phoenix0120
Try this..
Код:
public AutoSave() { for(new i;i<MAX_PLAYERS;i++) { if(Logged[i] == 1) { GetPlayerName(i,PlayerName); Money[i] = GetPlayerMoney(playerid); TruckerSkin[i] = GetPlayerSkin(playerid); TruckType[i] = dini_Int(udb_encode(PlayerName), "TruckType"); JobsDone[i] = dini_Int(udb_encode(PlayerName), "JobsDone"); JobLevel[i] = dini_Int(udb_encode(PlayerName), "JobLevel"); dini_IntSet(udb_encode(PlayerName), "Money", Money[i]); dini_IntSet(udb_encode(PlayerName), "TruckType", TruckType[i]); dini_IntSet(udb_encode(PlayerName), "JobsDone", JobsDone[i]); dini_IntSet(udb_encode(PlayerName), "JobLevel", JobLevel[i]); dini_IntSet(udb_encode(PlayerName), "Skin", TruckerSkin[i]); } } SendClientMessage(playerid, COLOUR_YELLOW, "[SERVER] All Registered Accounts Have Been Auto Saved."); } |
pawn Код:
public AutoSave()
{
for(new playerid;playerid<MAX_PLAYERS;playerid++)
{
if(IsPlayerConnected(playerid))
{
if(Logged[playerid] == 1)
{
Money[playerid] = GetPlayerMoney(playerid);
TruckerSkin[playerid] = GetPlayerSkin(playerid);
TruckType[playerid] = dini_Int(udb_encode(PlayerName), "TruckType");
JobsDone[playerid] = dini_Int(udb_encode(PlayerName), "JobsDone");
JobLevel[playerid] = dini_Int(udb_encode(PlayerName), "JobLevel");
dini_IntSet(udb_encode(PlayerName), "Money", Money[playerid]);
dini_IntSet(udb_encode(PlayerName), "TruckType", TruckType[playerid]);
dini_IntSet(udb_encode(PlayerName), "JobsDone", JobsDone[playerid]);
dini_IntSet(udb_encode(PlayerName), "JobLevel", JobLevel[playerid]);
dini_IntSet(udb_encode(PlayerName), "Skin", TruckerSkin[playerid]);
SendClientMessage(playerid, COLOUR_YELLOW, "[SERVER] All Registered Accounts Have Been Auto Saved.");
}
}
}
}