[HELP] Phone system problem
#6

I forgot to post full Timer with TaxiMeter (for TAXI job) and PhoneCallCheck

Код:
task TimerForAll[1000]()
{
	new sendername[MAX_PLAYER_NAME], str[256];
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(TaxiTime[i] > 0 && TaxiDriver[i] < 999 && IsPlayerInAnyVehicle(i) && IsATaxiJobVehicle(GetPlayerVehicleID(i)))
	    {
	        if(GetPlayerMoney(i) <= TaxiTime[i])
	        {
             	GivePlayerMoney(i, -TaxiTime[i]);
             	RemovePlayerFromVehicle(i);
             	TaxiMoney[TaxiDriver[i]] += TaxiTime[i];
	            format(str, sizeof(str), "Nemate dovoljno novca da nastavite voznju, platili ste %d$", TaxiTime[i]);
	            SCM(i, BOJA_NARANDZASTA, str);
				format(str, sizeof(str), "Putnik nema dovoljno novca da nastavi voznju. Napustio je vozilo i platio (20)+%d$", TaxiTime[i]);
				SCM(TaxiDriver[i], BOJA_NARANDZASTA, str);
				TaxiTime[i] = 0;
				TaxiDriver[i] = 0;
			}
			else
			{
			    TaxiTime[i] += 1;
				format(str, sizeof(str), "CENA VOZNJE: %d", TaxiTime[i]);
				GameTextForPlayer(i, str, 1000, 6);
			}
		}
	 	else if(InCall[i] != 999 && iCall[i] != 999)
		{
		    if(PlayerInfo[i][pMobileCredit] == 0)
		    {
		        iCall[i] = 999;
		        InCall[i] = 999;
		        InCall[CalledPlayer[i]] = 999;
		        SCM(i, BOJA_CRVENA, "Nemate dovoljno kredita da nastavite razgovor!");
		        GetPlayerName(i, sendername, sizeof(sendername));
		        format(str, sizeof(str), "%s nema dovoljno kredita da nastavi razgovor!", sendername);
		        SCM(CalledPlayer[i], BOJA_CRVENA, str);
		        Caller[CalledPlayer[i]] = 999;
		        CalledPlayer[i] = 999;
			}
			else
			{
			    PlayerInfo[i][pMobileCredit] -= 1;
			    SavePlayer(i);
			}
		}
	}
}
Should i do the same, to call the Timer when player JOIN ?
Reply


Messages In This Thread
[HELP] Phone system problem - by 032.Marcus - 19.11.2014, 16:42
Re: [HELP] Phone system problem - by Fel486 - 19.11.2014, 16:52
Re : [HELP] Phone system problem - by Dutheil - 19.11.2014, 17:05
Re: Re : [HELP] Phone system problem - by dominik523 - 19.11.2014, 18:01
Re : Re: Re : [HELP] Phone system problem - by Dutheil - 19.11.2014, 18:03
Re: [HELP] Phone system problem - by 032.Marcus - 19.11.2014, 18:03
Re: Re : Re: Re : [HELP] Phone system problem - by dominik523 - 19.11.2014, 18:21
Re : Re: Re : Re: Re : [HELP] Phone system problem - by Dutheil - 19.11.2014, 18:22

Forum Jump:


Users browsing this thread: 5 Guest(s)