SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 18/05/2018, 02:22 PM   #1
leobpo
Little Clucker
 
Join Date: Dec 2016
Posts: 27
Reputation: 0
Default Sistema de salvamento

Se não me engano meu gamemode , tem o sistema de salvamento , e não to conseguindo colocar um novo dado para salvar que no caso é o "Coins" , já coloquei o sistema digito /darcash e seta um valor de cash , mas não esta sendo salvo esse valor
Se alguem puder ajudar .

PHP Code:
public OnPlayerRegister(playeridpassword[])
{
    if(
IsPlayerConnected(playerid))
 {
            new 
string3[64];
            new 
playername3[MAX_PLAYER_NAME];
            
GetPlayerName(playeridplayername3sizeof(playername3));
            
format(string3sizeof(string3), "Players/%s.ini"playername3);
            new 
FilehFile fopen(string3io_write);
            
DisablePlayerCheckpoint(playerid);
            if (
hFile)
            {
                
strmid(JogadorInfo[playerid][pKey], password0strlen(password), 255);
                new var[
32];
                
format(var, 32"Key=%s\n"JogadorInfo[playerid][pKey]);fwrite(hFile, var);
                
JogadorInfo[playerid][pCash] = GetPlayerMoneyEx(playerid);
                
format(var, 32"Level=%d\n",JogadorInfo[playerid][pLevel]);fwrite(hFile, var);
                
format(var, 32"AdminLevel=%d\n",JogadorInfo[playerid][pAdmin]);fwrite(hFile, var); 
__________________
leobpo is offline   Reply With Quote
Old 18/05/2018, 06:12 PM   #2
uliano
Big Clucker
 
uliano's Avatar
 
Join Date: Oct 2015
Location: Limeira-SP
Posts: 114
Reputation: 0
Default Re: Sistema de salvamento

Pq nao usa dof2 ? N to no pc agr, c nao lhe dava um exemplo.
__________________


Jogar Agora

Fórum
uliano is offline   Reply With Quote
Old 18/05/2018, 07:02 PM   #3
zNaKa
Little Clucker
 
zNaKa's Avatar
 
Join Date: Apr 2018
Posts: 34
Reputation: 0
Default Re: Sistema de salvamento

Quote:
public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new string3[64];
new playername3[MAX_PLAYER_NAME];
JogadorInfo[playerid][pCash] = GetPlayerMoneyEx(playerid);
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "Players/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
DisablePlayerCheckpoint(playerid);
if (hFile)
{
strmid(JogadorInfo[playerid][pKey], password, 0, strlen(password), 255);
new var[32];
format(var, 32, "Key=%s\n", JogadorInfo[playerid][pKey]);fwrite(hFile, var);
format(var, 32, "Coins=%d\n", JogadorInfo[playerid][pCash]);fwrite(hFile,var);
format(var, 32, "Level=%d\n",JogadorInfo[playerid][pLevel]);fwrite(hFile, var);
format(var, 32, "AdminLevel=%d\n",JogadorInfo[playerid][pAdmin]);fwrite(hFile, var)
Veja se isso pode Resolver !
zNaKa is offline   Reply With Quote
Old 18/05/2018, 07:31 PM   #4
AutoMatic2
Big Clucker
 
Join Date: Apr 2018
Posts: 66
Reputation: 2
Default Re: Sistema de salvamento

Usa DOF2 man, bem melhor!
AutoMatic2 is offline   Reply With Quote
Old 18/05/2018, 07:44 PM   #5
uliano
Big Clucker
 
uliano's Avatar
 
Join Date: Oct 2015
Location: Limeira-SP
Posts: 114
Reputation: 0
Default Re: Sistema de salvamento

http://forum.sa-mp.com/showthread.php?t=422519

Um Tutorial para ti
__________________


Jogar Agora

Fórum
uliano 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] Sistema de Vip com Salvamento ShuCk Português/Portuguese 13 20/01/2018 11:44 PM
[Ajuda] Sistema de salvamento Vinicin Português/Portuguese 4 20/06/2016 08:09 PM
[Ajuda] Sistema de Ban (Salvamento) PristonBreak Português/Portuguese 5 06/03/2015 01:11 AM
[Pedido] Sistema de salvamento.. Leopawno Português/Portuguese 16 27/09/2013 11:27 AM


All times are GMT. The time now is 08:03 AM.


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