INI_WriteInt("Dinheiro", GetPlayerMoney(playerid));
DOF2_SetInt("arquivo.ini", "Dinheiro", GetPlayerMoney(playerid));
native DOF2_SetFile(file[]);
native DOF2_LoadFile();
native DOF2_SaveFile();
native DOF2_ParseFile(file[],extraid,bool:callback=true);
native DOF2_ReparseFile(file[],extraid,bool:callback=true);
native DOF2_WriteFile();
native DOF2_PrintFile(comment[]="");
native DOF2_GetString(file[],key[],tag[]="");
native DOF2_GetStringEx(file[],key[],result[],size,tag[]="");
native Float:DOF2_GetFloat(file[],key[]);
native DOF2_GetInt(file[],key[],tag[]="");
native DOF2_GetHex(file[],key[],tag[]="");
native DOF2_GetBin(file[],key[],tag[]="");
native bool:DOF2_GetBool(file[],key[],tag[]="");
native DOF2_SetString(file[],key[],value[],tag[]="");
native DOF2_SetFloat(file[],key[],Float:value);
native DOF2_SetInt(file[],key[],value,tag[]="");
native DOF2_SetHex(file[],key[],value,tag[]="");
native DOF2_SetBin(file[],key[],value,tag[]="");
native DOF2_SetBool(file[],key[],bool:value,tag[]="");
native DOF2_IsSet(file[],key[],tag[]="");
native DOF2_Unset(file[],key[],tag[]="");
native DOF2_FileExists(file[]);
native DOF2_RemoveFile(file[]);
native DOF2_CreateFile(file[],password[]="");
native DOF2_RenameFile(oldfile[],newfile[]);
native DOF2_RenameKey(file[],oldkey[],newkey[],tag[]="");
native DOF2_CopyFile(filetocopy[],newfile[]);
native DOF2_CheckLogin(file[],password[]);
native DOF2_File(user[]);
native DOF2_ParseInt();
native DOF2_ParseFloat();
native DOF2_ParseBool();
native DOF2_ParseBin();
native DOF2_ParseHex();
native DOF2_SetUTF8(bool:set);
native bool:DOF2_GetUTF8();
native DOF2_GetFile();
native DOF2_MakeBackup(file[]);
native DOF2_RemoveSection (file [], tag []);
native DOF2_SectionExists (file [], tag []);
native DOF2_SortSection (file [], tag [], bool: ignorecase = true, bool: ascending = true);
native DOF2_SortAllSections (file [], bool: ignorecase = true, bool: ascending = true);
native DOF2_SetCaseSensitivity (bool: set);
native DOF2_GetCaseSensitivity ();
stock SalvarDadosPlayer(playerid)
{
static Float:PosX, Float:PosY, Float:PosZ, Float:Vida, Float:Colete;
GetPlayerHealth(playerid, Vida);
GetPlayerArmour(playerid, Colete);
GetPlayerPos(playerid, PosX, PosY, PosZ);
format(arquivo, sizeof(arquivo), ContasPlayers, getName(playerid));
if(!INI_Exist(arquivo)) return 0x1;
INI_Open(arquivo);
INI_WriteInt("Dinheiro", GetPlayerMoney(playerid));
INI_WriteInt("Level", GetPlayerScore(playerid));
INI_WriteInt("Exp",PlayerInfo[playerid][Exp]);
INI_WriteInt("LevelProcurado", GetPlayerWantedLevel(playerid));
INI_WriteInt("Algemado",PlayerInfo[playerid][Algemado]);
INI_WriteInt("Skin", GetPlayerSkin(playerid));
INI_WriteFloat("Vida", Vida);
INI_WriteFloat("Colete", Colete);
INI_WriteFloat("PosX", PosX);
INI_WriteFloat("PosY", PosY);
INI_WriteFloat("PosZ", PosZ);
INI_WriteInt("Interior", GetPlayerInterior(playerid));
INI_WriteInt("VirtualWorld", GetPlayerVirtualWorld(playerid));
INI_WriteInt("TemConta", PlayerInfo[playerid][TemConta]);
INI_WriteInt("Saldo", PlayerInfo[playerid][Saldo]);
INI_WriteInt("Admin", PlayerInfo[playerid][Admin]);
INI_WriteInt("Profissao",PlayerProf[playerid]);
INI_WriteInt("Gasolina",Gasolina[playerid]);
INI_WriteInt("Morreu", Morreu[playerid]);
INI_WriteInt("Matou", Matou[playerid]);
INI_WriteInt("Convenio", PlayerInfo[playerid][Convenio]);
INI_WriteInt("Plano", PlayerInfo[playerid][Plano]);
INI_Save();
INI_Close();
return 0x1;
}
stock CarregarDadosPlayer(playerid)
{
format(arquivo, sizeof(arquivo), ContasPlayers, getName(playerid));
if(!INI_Exist(arquivo)) return 0x1;
INI_Open(arquivo);
GivePlayerMoney(playerid, INI_ReadInt("Dinheiro"));
SetPlayerScore(playerid, INI_ReadInt("Level"));
SetPlayerSkin(playerid, INI_ReadInt("SkinAtual"));
SetPlayerWantedLevel(playerid, INI_ReadInt("LevelProcurado"));
Morreu[playerid] = INI_ReadInt("Morreu");
Matou[playerid] = INI_ReadInt("Matou");
PlayerInfo[playerid][Admin] = INI_ReadInt("Admin");
PlayerInfo[playerid][TemConta] = INI_ReadInt("TemConta");
PlayerInfo[playerid][Saldo] = INI_ReadInt("Saldo");
PlayerInfo[playerid][Level] = INI_ReadInt("Level");
PlayerInfo[playerid][Dinheiro] = INI_ReadInt("Dinheiro");
PlayerProf[playerid] = INI_ReadInt("Profissao");
PlayerInfo[playerid][Exp] = INI_ReadInt("Exp");
Gasolina[playerid] = INI_ReadInt("Gasolina");
PlayerInfo[playerid][Algemado] = INI_ReadInt("Algemado");
PlayerInfo[playerid][Plano] = INI_ReadInt("Plano");
PlayerInfo[playerid][Convenio] = INI_ReadInt("Convenio");
INI_Close();
return 0x1;
}
stock SalvarDadosPlayer(playerid)
{
static Float:PosX, Float:PosY, Float:PosZ, Float:Vida, Float:Colete;
GetPlayerHealth(playerid, Vida);
GetPlayerArmour(playerid, Colete);
GetPlayerPos(playerid, PosX, PosY, PosZ);
format(arquivo, sizeof(arquivo), ContasPlayers, getName(playerid));
if(!DOF2_FileExist(arquivo)) return 0x1;
DOF2_SetInt(arquivo, "Dinheiro", GetPlayerMoney(playerid));
DOF2_SetInt(arquivo, "Level", GetPlayerScore(playerid));
DOF2_SetInt(arquivo, "Exp",PlayerInfo[playerid][Exp]);
DOF2_SetInt(arquivo, "LevelProcurado", GetPlayerWantedLevel(playerid));
DOF2_SetInt(arquivo, "Algemado",PlayerInfo[playerid][Algemado]);
DOF2_SetInt(arquivo, "Skin", GetPlayerSkin(playerid));
DOF2_SetFloat(arquivo, "Vida", Vida);
DOF2_SetFloat(arquivo, "Colete", Colete);
DOF2_SetFloat(arquivo, "PosX", PosX);
DOF2_SetFloat(arquivo, "PosY", PosY);
DOF2_SetFloat(arquivo, "PosZ", PosZ);
DOF2_SetInt(arquivo, "Interior", GetPlayerInterior(playerid));
DOF2_SetInt(arquivo, "VirtualWorld", GetPlayerVirtualWorld(playerid));
DOF2_SetInt(arquivo, "TemConta", PlayerInfo[playerid][TemConta]);
DOF2_SetInt(arquivo, "Saldo", PlayerInfo[playerid][Saldo]);
DOF2_SetInt(arquivo, "Admin", PlayerInfo[playerid][Admin]);
DOF2_SetInt(arquivo, "Profissao",PlayerProf[playerid]);
DOF2_SetInt(arquivo, "Gasolina",Gasolina[playerid]);
DOF2_SetInt(arquivo, "Morreu", Morreu[playerid]);
DOF2_SetInt(arquivo, "Matou", Matou[playerid]);
DOF2_SetInt(arquivo, "Convenio", PlayerInfo[playerid][Convenio]);
DOF2_SetInt(arquivo, "Plano", PlayerInfo[playerid][Plano]);
DOF2_SaveFile();
return 0x1;
}
stock CarregarDadosPlayer(playerid)
{
format(arquivo, sizeof(arquivo), ContasPlayers, getName(playerid));
if(!DOF2_FileExist(arquivo)) return 0x1;
GivePlayerMoney(playerid, DOF2_GetInt(arquivo, "Dinheiro"));
SetPlayerScore(playerid, DOF2_GetInt(arquivo, "Level"));
SetPlayerSkin(playerid, DOF2_GetInt(arquivo, "SkinAtual"));
SetPlayerWantedLevel(playerid, DOF2_GetInt(arquivo, "LevelProcurado"));
Morreu[playerid] = DOF2_GetInt(arquivo, "Morreu");
Matou[playerid] = DOF2_GetInt(arquivo, "Matou");
PlayerInfo[playerid][Admin] = DOF2_GetInt(arquivo, "Admin");
PlayerInfo[playerid][TemConta] = DOF2_GetInt(arquivo, "TemConta");
PlayerInfo[playerid][Saldo] = DOF2_GetInt(arquivo, "Saldo");
PlayerInfo[playerid][Level] = DOF2_GetInt(arquivo, "Level");
PlayerInfo[playerid][Dinheiro] = DOF2_GetInt(arquivo, "Dinheiro");
PlayerProf[playerid] = DOF2_GetInt(arquivo, "Profissao");
PlayerInfo[playerid][Exp] = DOF2_GetInt(arquivo, "Exp");
Gasolina[playerid] = DOF2_GetInt(arquivo, "Gasolina");
PlayerInfo[playerid][Algemado] = DOF2_GetInt(arquivo, "Algemado");
PlayerInfo[playerid][Plano] = DOF2_GetInt(arquivo, "Plano");
PlayerInfo[playerid][Convenio] = DOF2_GetInt(arquivo, "Convenio");
return 0x1;
}
PHP код:
|
error 017: undefined symbol "DOF2_FileExist"