Esto se puede hacer mejor?
#1

Hay una forma mбs optimizada de hacer este comando o asн es la mejor forma?

Код:
CMD:premium(playerid, params[])
{
	if(InformacionJugador_[playerid][pPremium] == 0) return SendClientMessage(playerid, COLOR_ROJO, "* No tienes membresнa Premium comprada en esta cuenta.");

	new restante_segundos = InformacionJugador_[playerid][pTiempoPremium] - gettime();
	    
	new restante_dias = ((restante_segundos /60) /60) /24;
    restante_segundos -= restante_dias*24*60*60;
    
	new restante_horas = (restante_segundos /60) /60;
    restante_segundos -= restante_horas*60*60;
    
	new restante_minutos = (restante_segundos /60);
	restante_segundos -= restante_minutos*60;
	
	new string[108];
	format(string, sizeof(string), "* Tiempo: %d dнa(s) %d hora(s) %d minuto(s) %d segundo(s) restante(s) de membresнa Premium.", restante_dias, restante_horas, restante_minutos, restante_segundos);
	SendClientMessage(playerid, COLOR_CELESTE, string);
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)