[Ajuda] Nгo salva score
#1

Tipo dou um score pro player ai reinicio o gamemode no painel й nгo salva o score do player quando ele loga zera.

PHP код:
public OnPlayerSpawn
Player
[playerid][Score] = SetPlayerScore(playeridDOF2_GetInt(PegarConta(playerid), "Score")); 
PHP код:
static stock Salvar_Conta(playerid)
{
    
Player[playerid][Skin] = GetPlayerSkin(playerid);
    
Player[playerid][Money] = GetPlayerMoney(playerid);
    
Player[playerid][Score] = GetPlayerScore(playerid);
    
//
    
DOF2_SetInt(PegarConta(playerid), "AdminNivel"Player[playerid][Admin]);
    
DOF2_SetInt(PegarConta(playerid), "Faccoes"Player[playerid][Faccoes]);
    
DOF2_SetInt(PegarConta(playerid), "Morro"Player[playerid][Morro]);
    
DOF2_SetInt(PegarConta(playerid), "Cargo"Player[playerid][Cargo]);
    
DOF2_SetInt(PegarConta(playerid), "Desmanche"Player[playerid][DesmancheTime]);
    
DOF2_SetInt(PegarConta(playerid), "Coins"Player[playerid][Coins]);
    
DOF2_SetInt(PegarConta(playerid), "Matou"Player[playerid][Killed]);
    
DOF2_SetInt(PegarConta(playerid), "BOPE"Player[playerid][BOPE]);
    
DOF2_SetInt(PegarConta(playerid), "PM"Player[playerid][PMRJ]);
    
DOF2_SetInt(PegarConta(playerid), "Morreu"Player[playerid][Died]);
    
DOF2_SetInt(PegarConta(playerid),"TempoOnline"Player[playerid][pOnlineTime]);
    
DOF2_SetInt(PegarConta(playerid), "Helper"Player[playerid][Helper]);
    
DOF2_SetInt(PegarConta(playerid), "Reconhecimento"Player[playerid][AHelper]);
    
DOF2_SetInt(PegarConta(playerid), "nReconhecimento"Player[playerid][ANHelper]);
    
DOF2_SetInt(PegarConta(playerid), "DuvidasR"Player[playerid][DHelper]);
    
//
    
DOF2_SetInt(PegarConta(playerid), "Money"Player[playerid][Money]);
    
DOF2_SetInt(PegarConta(playerid), "Score"Player[playerid][Score]);
    
DOF2_SetInt(PegarConta(playerid), "Skin"Player[playerid][Skin]);
    
//
    
DOF2_SetInt(PegarConta(playerid), "Reporter"Player[playerid][Reporter]);
    
DOF2_SetInt(PegarConta(playerid), "Matuto"Player[playerid][Matuto]);
    
DOF2_SetInt(PegarConta(playerid), "VezesLogadas"Player[playerid][VezesLogadas]);
    
DOF2_SetInt(PegarConta(playerid), "WeaponCoast"Player[playerid][WeaponCoast]);
    
DOF2_SetInt(PegarConta(playerid), "XOneWin"Player[playerid][XOneWin]);
    
//
    
DOF2_SetInt(PegarConta(playerid), "VipNivel"Player[playerid][Vip]);
    
DOF2_SetInt(PegarConta(playerid), "DiasVip"Player[playerid][DiasVip]);
    
DOF2_SetInt(PegarConta(playerid), "TempoVip"Player[playerid][TempoVip]);
    
//
    
DOF2_SaveFile();
    return 
1;

Reply
#2

Seta o Level normal para o Player.

Exemplo:

PHP код:
SetPlayerScore(playerid10); 
Para Salvar:

PHP код:
DOF2_SetInt(PegarConta(playerid), "Score"Player[playerid][Score] = GetPlayerScore(playerid)); 
e Tire do Comeзo essa linha.

PHP код:
Player[playerid][Score] = GetPlayerScore(playerid); 
Reply
#3

PHP код:
Player[playerid][Score] = DOF2_GetInt(PegarConta(playerid), "Score");
SetPlayerScore(playeridPlayer[playerid][Score]); 
E deixe apenas como stock! Retire o static.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)