Problem with timer
#3

well i can show it to you but i guess u wont understand names
Код:
public Odbrojavanja()
{
	foreach(Player, i)
	{
	    if(hIgracUlogovan[i] == 0) continue;
	    new vehicleid = GetPlayerVehicleID(i);
	    if (vehicleid != INVALID_VEHICLE_ID)
				    GetVehiclePos(vehicleid, VehiclePos[vehicleid][0], VehiclePos[vehicleid][1], VehiclePos[vehicleid][2]);
		if(IsPaused[i] == 0)
		{
	    	if(PI[i][ZatvorenVreme] > 0){ PI[i][ZatvorenVreme]--; SCM(i, CRVENA, "Erro!"); }
	    	if(PI[i][Utisan] > 0){PI[i][Utisan]--;if (PI[i][Utisan]==0){SetPlayerChatBubble(i, "", 0xFF0000AA, 15.0, 1);SCM(i,COLOR_WHITE,"{F81414}| GG Anticheat |{FFFFFF}Vise niste utisani, sada pamet u glavu.");}}
        	if(PI[i][Utisan] < 0) PI[i][Utisan] = 0;
	    }
		if(PI[i][MehanicarOdvoz] > 0) PI[i][MehanicarOdvoz]--;
	 	if(hZavezan[i] > 0) hZavezan[i]--;
		if(PI[i][DetektivVreme] > 0) PI[i][DetektivVreme]--;
		if(PI[i][KradljivacVreme] > 0) PI[i][KradljivacVreme]--;
		if(PI[i][DzeparosVreme] > 0) PI[i][DzeparosVreme]--;
		if(PI[i][MobilniDzeparos] > 0) PI[i][MobilniDzeparos]--;
		if(PI[i][LekVreme] > 0) PI[i][LekVreme]--;
		if(PI[i][RovarenjeVreme] > 0) PI[i][RovarenjeVreme]--;
		if(PI[i][ATMRob] > 0) PI[i][ATMRob]--;
		
		if(RentTimer[i] > 0) RentTimer[i]--;
		if(RentTimer[i] <= 0){
			RentTimer[i] = 0;
			new idv = RentVozilo[IznajmioVozilo[i]];
			if(VoziloJeAvion(GetVehicleModel(idv)) || VoziloJeBrod(GetVehicleModel(idv)) || VoziloJeKamion(GetVehicleModel(idv)))
				Gorivo[idv] = 100.00;
			else if(VoziloJeMotor(GetVehicleModel(idv)))
				Gorivo[idv] = 20.00;
			else if(VoziloJeBiciklo(GetVehicleModel(idv)) || GetVehicleModel(idv) == 538)
				Gorivo[idv] = 1000000.00;
			else Gorivo[idv] = 20.00;

			VoziloIznajmljeno[IznajmioVozilo[i]] = -1;
			SetVehicleToRespawn(RentVozilo[IznajmioVozilo[i]]);
			IznajmioVozilo[i] = -1;
			SCM(i, CRVENA, "Istekao vam je rent.");
		}
         }
        return 1;
}
Reply


Messages In This Thread
Problem with timer - by Wiruspwns - 31.01.2015, 12:13
Re: Problem with timer - by CalvinC - 31.01.2015, 13:14
Re: Problem with timer - by Wiruspwns - 31.01.2015, 13:26

Forum Jump:


Users browsing this thread: 1 Guest(s)