17.03.2013, 12:48
Opзгo 1:
Opзгo 2:
pawn Код:
public OnGameModeExit()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
PlayerInfo[i][pSkin] = GetPlayerSkin(i);
PlayerInfo[i][pInt] = GetPlayerInterior(i);
GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
PlayerInfo[i][PosX] = Pos[0];
PlayerInfo[i][PosY] = Pos[1];
PlayerInfo[i][PosZ] = Pos[2];
format(arquivo, sizeof arquivo, FILE, Nome(i));
DOF2_SetInt(arquivo, "Grana", PlayerInfo[i][pGrana]);
DOF2_SetInt(arquivo, "Administrador", PlayerInfo[i][pAdmin]);
DOF2_SetInt(arquivo, "Reputacao", PlayerInfo[i][pRep]);
DOF2_SetInt(arquivo, "Skin", PlayerInfo[i][pSkin]);
DOF2_SetFloat(arquivo,"PosicaoX", PlayerInfo[i][PosX]);
DOF2_SetFloat(arquivo,"PosicaoY", PlayerInfo[i][PosY]);
DOF2_SetFloat(arquivo,"PosicaoZ", PlayerInfo[i][PosZ]);
DOF2_SetFloat(arquivo,"Interior", PlayerInfo[i][pInt]);
DOF2_SetInt(arquivo, "Emprego", PlayerInfo[i][pEmp]);
DOF2_SaveFile();
}
DOF2_Exit();
return 1;
}
pawn Код:
public OnGameModeExit()
{
foreach(Player, i)
{
PlayerInfo[i][pSkin] = GetPlayerSkin(i);
PlayerInfo[i][pInt] = GetPlayerInterior(i);
GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
PlayerInfo[i][PosX] = Pos[0];
PlayerInfo[i][PosY] = Pos[1];
PlayerInfo[i][PosZ] = Pos[2];
format(arquivo, sizeof arquivo, FILE, Nome(i));
DOF2_SetInt(arquivo, "Grana", PlayerInfo[i][pGrana]);
DOF2_SetInt(arquivo, "Administrador", PlayerInfo[i][pAdmin]);
DOF2_SetInt(arquivo, "Reputacao", PlayerInfo[i][pRep]);
DOF2_SetInt(arquivo, "Skin", PlayerInfo[i][pSkin]);
DOF2_SetFloat(arquivo,"PosicaoX", PlayerInfo[i][PosX]);
DOF2_SetFloat(arquivo,"PosicaoY", PlayerInfo[i][PosY]);
DOF2_SetFloat(arquivo,"PosicaoZ", PlayerInfo[i][PosZ]);
DOF2_SetFloat(arquivo,"Interior", PlayerInfo[i][pInt]);
DOF2_SetInt(arquivo, "Emprego", PlayerInfo[i][pEmp]);
DOF2_SaveFile();
}
DOF2_Exit();
return 1;
}