[Ajuda] DOF2 iniciar.
#4

PHP код:
public OnGameModeExit()
{
    for(new 
0MAX_PLAYERSi++) SalvarPlayer(i);//Quando o server desligar ele ira salvar os dados dos playes
    
DOF2::Exit();
    return 
1;

PHP код:
stock SalvarPlayer(playerid)
{
    
GetPlayerName(playeridNomesizeof(Nome));
    
format(Stringsizeof(String), CONTASNome);
    
GetPlayerHealth(playerid,Vida[playerid]);
    
GetPlayerArmour(playerid,Colete[playerid]);
    
getdate(Ano[playerid], Mes[playerid], Dia[playerid]), gettime(Hora[playerid], Minuto[playerid], Segundo[playerid]);
    
DOF2::SetInt(String,"Dinheiro"GetPlayerMoney(playerid));
    
Vida[playerid] = DOF2_SetFloat(String"Vida",Vida[playerid]);
    
Colete[playerid] = DOF2_SetFloat(String"Colete",Colete[playerid]);
    
DOF2::SetInt(String,"Level"GetPlayerScore(playerid));
    
winsr[playerid] = DOF2::SetInt(String,"Wins Race"winsr[playerid]);
    
Admin[playerid] = DOF2::SetInt(String,"Admin"Admin[playerid]);
    
DOF2::SetInt(String,"Skin"GetPlayerSkin(playerid));
    
DOF2::SetInt(String,"Matou"Matou[playerid]);
    
DOF2::SetInt(String,"Morreu"Morreu[playerid]);
    
DOF2::SetInt(String,"Logou"Logou[playerid]);
    
DOF2::SetInt(String"Segundo",  Segundo[playerid]);
    
DOF2::SetInt(String"Minuto",  Minuto[playerid]);
    
DOF2::SetInt(String"Hora"Hora[playerid]);
    
DOF2::SetInt(String"Dia"Dia[playerid]);
    
DOF2::SetInt(String"Mкs"Mes[playerid]);
    
DOF2::SetInt(String"Ano"Ano[playerid]);
    
DOF2::SaveFile();
    return 
true;

Tambйm da uma olhada https://sampforum.blast.hk/showthread.php?tid=585807
Reply


Messages In This Thread
DOF2 iniciar. - by Hollyzinho - 05.11.2017, 01:28
Re: DOF2 iniciar. - by RodrigoMSR - 05.11.2017, 01:32
Re: DOF2 iniciar. - by C4rtm4n - 05.11.2017, 01:54
Re: DOF2 iniciar. - by Marllun - 05.11.2017, 02:11
Re: DOF2 iniciar. - by IlanZ - 05.11.2017, 03:03
Re: DOF2 iniciar. - by CezarBR - 05.11.2017, 03:04
Re: DOF2 iniciar. - by Naine - 05.11.2017, 03:16
Re: DOF2 iniciar. - by ScripitrFaunu - 05.11.2017, 15:34
Re: DOF2 iniciar. - by C4rtm4n - 05.11.2017, 16:07
Re: DOF2 iniciar. - by ScripitrFaunu - 05.11.2017, 16:20

Forum Jump:


Users browsing this thread: 1 Guest(s)