SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 12/01/2013, 06:03 PM   #1
Pietrotm2012
Big Clucker
 
Join Date: Dec 2012
Location: Los Santos
Posts: 150
Reputation: 2
Default Salvar Kills E Mortes (Ajudem meee)

Variável:
pawn Code:
new Kills[MAX_PLAYERS]; // Sistema De Status
new Deaths[MAX_PLAYERS]; // Sistema De Status

Eu Uso Dini e Zcmd eu so queria que salvasse pf ajudem
Pietrotm2012 is offline   Reply With Quote
Old 12/01/2013, 06:06 PM   #2
Linow
Big Clucker
 
Join Date: Jul 2010
Location: Brazil
Posts: 83
Reputation: 13
Default Re: Salvar Kills E Mortes (Ajudem meee)

pawn Code:
dini_IntSet(file[], "Kills", Kills[playerid]);
dini_IntSet(file[], "Deaths", Deaths[playerid]);

?
Linow is offline   Reply With Quote
Old 12/01/2013, 06:06 PM   #3
zSuYaNw
Godfather
 
zSuYaNw's Avatar
 
Join Date: Apr 2010
Location: Santa Catarina
Posts: 6,840
Reputation: 672
Default Re: Salvar Kills E Mortes (Ajudem meee)

botei no ****** "Usando DINI"

Apareceu o primeiro resultado: http://forum.sa-mp.com/showthread.php?t=180237
zSuYaNw is offline   Reply With Quote
Old 12/01/2013, 06:15 PM   #4
Dwayne-Pheonix
Banned
 
Join Date: Jul 2006
Location: Brazil
Posts: 235
Reputation: 45
Default Re: Salvar Kills E Mortes (Ajudem meee)

Simples amigo, adicione em seu OnPlayerConnect e OnPlayerDisconnect.

pawn Code:
public OnPlayerConnect(playerid) {
    Kills[playerid] = dini_Int(file[], "Kills");
    Deaths[playerid] = dini_Int(file[], "Deaths");
    return 1;
}

public OnPlayerDisconnect(playerid, reason) {
    dini_IntSet(file[], "Kills", Kills[playerid]);
    dini_IntSet(file[], "Deaths", Deaths[playerid]);
    return 1;
}

Quando chamada OnPlayerConnect irá carregar o valor salvo no seu arquivo.

Já quando chamada em OnPlayerDisconnect irá apenas salvar o seu valor atual

Lembrando que 'file[]' deve ser alterado para o arquivo em que você salva as informações do jogador
Dwayne-Pheonix is offline   Reply With Quote
Old 12/01/2013, 06:25 PM   #5
zSuYaNw
Godfather
 
zSuYaNw's Avatar
 
Join Date: Apr 2010
Location: Santa Catarina
Posts: 6,840
Reputation: 672
Default Re: Salvar Kills E Mortes (Ajudem meee)

e se alguém entrar com meu nick no servidor ?
zSuYaNw is offline   Reply With Quote
Old 12/01/2013, 06:29 PM   #6
Dwayne-Pheonix
Banned
 
Join Date: Jul 2006
Location: Brazil
Posts: 235
Reputation: 45
Default Re: Salvar Kills E Mortes (Ajudem meee)

Creio que haja algum tipo de sistema de registro impossibilitando a desova caso a conta já exista.

Se o sistema dele não funcionar assim, ele pode me enviar uma pm que eu faço pra ele
Dwayne-Pheonix is offline   Reply With Quote
Old 12/01/2013, 06:29 PM   #7
Pietrotm2012
Big Clucker
 
Join Date: Dec 2012
Location: Los Santos
Posts: 150
Reputation: 2
Default Re: Salvar Kills E Mortes (Ajudem meee)

Quote:
Originally Posted by [Full]Garfield[XDB] View Post
botei no ****** "Usando DINI"

Apareceu o primeiro resultado: http://forum.sa-mp.com/showthread.php?t=180237
Vlw Garfield Vi O Tutorial e consegui fazer o meu Rep+
Pietrotm2012 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
[FilterScript] Ranking por Mortes Baiano Lançamentos/Releases 15 24/12/2012 12:01 AM
bus no /rg mortes e assasinatos coringa_smith157 Português/Portuguese 7 17/03/2012 04:15 PM
[Duvida] % - Salvar Dados - Id Veiculo - Salvar MySql savarro Português/Portuguese 9 16/09/2011 04:20 PM
[AJUDA] Salvar Deaths e Kills na conta do player PawninG Português/Portuguese 5 01/10/2010 02:25 PM
[DUV] salvar Kills e Deaths & Anti-Flood [NWD]Tweener_ Português/Portuguese 9 04/09/2010 02:28 PM


All times are GMT. The time now is 09:11 PM.


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