[Ajuda] PayDay.
#2

[Include] New SA-MP callbacks!
SetTimerEx

@Edit

Ignore a include que lhe passei (havia lido "quando o jogador pausar o jogo e quando ele voltasse, continuar" .__.), faz igual o JF falou, salva o tempo online numa variбvel e salve ela quando o jogador desconectar com seu sistema de salvamento, aн quando o jogador logar novamente, carrega o tempo na variбvel e continua a processo.

Exemplo:
Код:
new TempoParaPayday[MAX_PLAYERS], timertempoonline[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
	TempoParaPayday[playerid] = DOF2_GetInt(local do arquivo, "TempoOnline");
	timertempoonline[playerid] = SetTimerEx("TempoOnlineTimer", 60000, true, "i", playerid);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	DOF2_SetInt(local do arquivo, "TempoOnline", TempoParaPayday[playerid]);
	KillTimer(timertempoonline[playerid]);
	return 1;
}

TempoOnlineTimer(playerid);
public TempoOnlineTimer(playerid)
{
	TempoParaPayday[playerid]++;
	return 1;
}
Й uma base simples, adapte-a conforme queira.
Reply


Messages In This Thread
PayDay. - by dudu_Insane - 03.12.2014, 16:23
Re: PayDay. - by Seidel - 03.12.2014, 16:29
Re: PayDay. - by JonathanFeitosa - 03.12.2014, 23:12
Respuesta: PayDay. - by dudu_Insane - 04.12.2014, 23:39
Re: PayDay. - by JoshNudock - 04.12.2014, 23:48

Forum Jump:


Users browsing this thread: 1 Guest(s)