SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 23/10/2019, 08:37 PM   #1
oRaphael
Huge Clucker
 
oRaphael's Avatar
 
Join Date: Jul 2019
Location: Goiânia, Goias.
Posts: 198
Reputation: 2
Smile Salvamento

Por que não esta salvando os VIPS/Socios nem carregando?

PHP Code:
stock SalvarPlayer(playerid)
{
    if (
DOF2_FileExists(DigRetornar(playerid)))
    {
        
DOF2_SetInt(DigRetornar(playerid), "VIP Level"iPlayerInfo[playerid][iVIP]);
        
DOF2_SetInt(DigRetornar(playerid), "SOCIO Level"iPlayerInfo[playerid][iSocio]);
        
DOF2_SaveFile();
    }
}

stock CarregarPlayer(playerid)
{
    if (
DOF2_FileExists(DigRetornar(playerid)))
    {
        
iPlayerInfo[playerid][iSocio] = DOF2_GetInt(DigRetornar(playerid), "SOCIO Level");
        
iPlayerInfo[playerid][iVIP] = DOF2_GetInt(DigRetornar(playerid), "VIP Level");
    }

PHP Code:
stock DigRetornar(playerid)
{
    new 
DigFiles[156], Name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridNamesizeof(Name));
    
format(DigFilessizeof(DigFiles), iPastaName);
    return 
DigFiles;

__________________
Fundador, Hyze RPG.
oRaphael is offline   Reply With Quote
Old 23/10/2019, 09:17 PM   #2
ipsLuan
High-roller
 
ipsLuan's Avatar
 
Join Date: Feb 2013
Location: Ilhéus, BA
Posts: 4,431
Reputation: 327
Default Re: Salvamento

Provavelmente é o #define iPasta
__________________
Brasil New Style
172.106.11.138:7777
ipsLuan is offline   Reply With Quote
Old 24/10/2019, 12:48 AM   #3
Jimmmy
Gangsta
 
Jimmmy's Avatar
 
Join Date: Jul 2014
Location: Rio de Janeiro
Posts: 531
Reputation: 66
Default Re: Salvamento

Quote:
Originally Posted by ipsLuan View Post
Provavelmente é o #define iPasta
Conserteza!
__________________



Hospedagem de Site, Host SA:MP, Revenda SA:MP, Host MTA, Host minecraft e VPS, Antiddos incluído em todos planos.

Viva Virtual - Em desenvolvimento...

Faço scripts de samp por encomenda. Entra em contato PM!.
Jimmmy is offline   Reply With Quote
Old 24/10/2019, 09:49 PM   #4
oRaphael
Huge Clucker
 
oRaphael's Avatar
 
Join Date: Jul 2019
Location: Goiânia, Goias.
Posts: 198
Reputation: 2
Default Re: Salvamento

#define iPasta "Geral/VipsSocios/%s.txt"
__________________
Fundador, Hyze RPG.
oRaphael is offline   Reply With Quote
Old 24/10/2019, 11:56 PM   #5
AdrianoStk
Huge Clucker
 
AdrianoStk's Avatar
 
Join Date: Jan 2013
Location: Presidente Prudente-SP
Posts: 448
Reputation: 29
Default Re: Salvamento

Testa...

Certifique-se que haja o diretório informado pelo iPastas...
Certifique-se que o arquivo do usuário seja um arquivo tipo txt


PHP Code:
stock SalvarPlayer(playerid)
{
    if (
DOF2_FileExists(DigRetornar(playerid)))
    {
        
DOF2_SetInt(DigRetornar(playerid), "VIPLevel"iPlayerInfo[playerid][iVIP]);
        
DOF2_SetInt(DigRetornar(playerid), "SOCIOLevel"iPlayerInfo[playerid][iSocio]);
        
DOF2_SaveFile();
    }
    return 
1;
}

stock CarregarPlayer(playerid)
{
    if (
DOF2_FileExists(DigRetornar(playerid)))
    {
        
iPlayerInfo[playerid][iSocio] = DOF2_GetInt(DigRetornar(playerid), "SOCIOLevel");
        
iPlayerInfo[playerid][iVIP] = DOF2_GetInt(DigRetornar(playerid), "VIPLevel");
    }
    return 
1;



#define iPasta "Geral/VipsSocios/%s.txt"
stock DigRetornar(playerid)
{
    new 
DigFiles[64], Name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridNamesizeof(Name));
    
format(DigFilessizeof(DigFiles), iPastaName);
    return 
DigFiles;

__________________
Hayllander Server's


Breve, nos servidores


Discord
AdrianoStk is offline   Reply With Quote
Old 26/10/2019, 12:30 PM   #6
oRaphael
Huge Clucker
 
oRaphael's Avatar
 
Join Date: Jul 2019
Location: Goiânia, Goias.
Posts: 198
Reputation: 2
Default Re: Salvamento

Não salvou
__________________
Fundador, Hyze RPG.
oRaphael is offline   Reply With Quote
Old 26/10/2019, 01:23 PM   #7
Don_Speed
High-roller
 
Don_Speed's Avatar
 
Join Date: Sep 2011
Location: Curitiba / PR
Posts: 3,256
Reputation: 256
Default Re: Salvamento

Posso estar errado , mas deve ser a descrição do arquivo que da erro (txt) , tira e faça o teste ...
__________________
Don_Speed is offline   Reply With Quote
Old 26/10/2019, 04:22 PM   #8
oRaphael
Huge Clucker
 
oRaphael's Avatar
 
Join Date: Jul 2019
Location: Goiânia, Goias.
Posts: 198
Reputation: 2
Default Re: Salvamento

Não e isso Don_Speed.
__________________
Fundador, Hyze RPG.
oRaphael is offline   Reply With Quote
Old 26/10/2019, 04:31 PM   #9
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 483
Reputation: 16
Default Re: Salvamento

Onde você está usando o SalvarPlayer?
NWDMadara is offline   Reply With Quote
Old 26/10/2019, 04:41 PM   #10
oRaphael
Huge Clucker
 
oRaphael's Avatar
 
Join Date: Jul 2019
Location: Goiânia, Goias.
Posts: 198
Reputation: 2
Default Re: Salvamento

OnPlayerDisconnect
__________________
Fundador, Hyze RPG.
oRaphael is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Uma luz com salvamento GalaxyS5 Português/Portuguese 1 22/08/2017 12:22 PM
[Pedido] fs de salvamento BartWhite Português/Portuguese 5 09/08/2015 04:57 AM
[Ajuda] salvamento ZeZin Português/Portuguese 8 01/05/2015 09:36 PM
[Ajuda] Salvamento Canema Português/Portuguese 5 10/09/2013 04:27 PM
[Ajuda] Salvamento denis15711 Português/Portuguese 15 04/07/2012 10:12 PM


All times are GMT. The time now is 01:49 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.