Jump to content
  • 0

Problema contorizare ore


Mistokus

Question

Toate celelalte variabile se modifica mai putin orele jucate. Ce pot face?

Asta e script-ul de payday.

COD: 

	for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
	if(ServerMinute == 0 && ServerSecond == 1)
	{
		new lvl = PlayerInfo[i][pLevel],pr = 1+PlayerInfo[i][pPremiumAcount],papagalll = 1+ParrotPuted[i],fpp = 1+PlayerInfo[i][pPremiumAcount];
		new ppaa = 0+papagalll;
		new rp = 0+pr;
		new fp = 0+fpp;
		new rand = lvl*50 + random(50);
		new dobanda = rand*ppaa;
		PlayerInfo[i][pRP] += rp;
		PlayerInfo[i][pHours] += PlayerInfo[i][pSeconds]/3600;	
		if(PlayerInfo[i][pLicence] > 0)
		{
			PlayerInfo[i][pLicence] -= 1;
		}
		if(PlayerInfo[i][pGLic] > 0)
		{
			PlayerInfo[i][pGLic] -= 1;
		}
		if(PlayerInfo[i][pPLic] > 0)
		{
			PlayerInfo[i][pPLic] -= 1;
		}
		if(PlayerInfo[i][pBLic] > 0)
		{
			PlayerInfo[i][pBLic] -= 1;
		}
		if(PlayerInfo[i][pRoll] < 50 && PlayerInfo[i][pSeconds] > 2200)
		{
			PlayerInfo[i][pRoll] += 10;
		}
		if(PlayerInfo[i][pGift] < 3 && SpecialWeek == 1 && PlayerInfo[i][pSeconds] > 1800)
		{
		    PlayerInfo[i][pGift] += 1;
		}
		if(PlayerInfo[i][pFactionPunish] > 0)
		{
			PlayerInfo[i][pFactionPunish] -= fp;
		}
		UpdateProgressBar(i);
		PlayerInfo[i][pBankMoney] += dobanda;
		SCM(i, -1, "{9DFE80}------------------------------------- PayDay -------------------------------------");		
		SCMEx(i, -1, "Bank Money: +%s$ | Respect Points: +%d | Playing Hours: +%0.2f", FormatNumber(dobanda), rp, PlayerInfo[i][pSeconds]/3600);		
		GameTextForPlayer(i, "~g~PAYDAY", 2000, 1);
		PlayerInfo[i][pSeconds] = 0;
		printf("Este ora %02d:%02d:%02d. Payday acordat!",ServerHour, ServerMinute, ServerSecond);
    }      

Cn rezolva are +1 de la mine

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

tu ai 

PlayerInfo[i][pHours] += PlayerInfo[i][pSeconds]/3600;

daca variabila PlayerInfo[i][pSeconds]  este 0 nu o sa iti bage nimic la ore, vezi unde se contorizeaza aceasta variabila si poate afli acolo buba

 

Citat
Link to comment
Share on other sites

  • 0
Acum 13 ore, SherKan a spus:

tu ai 


PlayerInfo[i][pHours] += PlayerInfo[i][pSeconds]/3600;

daca variabila PlayerInfo[i][pSeconds]  este 0 nu o sa iti bage nimic la ore, vezi unde se contorizeaza aceasta variabila si poate afli acolo buba

 

Ss contorizeaza secunde ca apar si in /time deci... ms oricum

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.