ID 0 Bugs; SERVER: Unknown Command
#20

First of all, I don't appreciate the thread hijacking. Please keep your private matters to PMs. Attached are my replies to the relevant comments. Many public functions in my script do not return values. These bugs are a recent development, and SVN indicates that code for these functions are many many revisions behind. Just to be certain, I have altered the script to return values from all my public functions. The ID 0 bug is still present.

Quote:
Originally Posted by Frank_Tesla
Can we see minutetimer and drugtimer as well? Maybe there's a toggle in there that's causing the problem every other minute.
Код:
public MinuteTimer()
{	
	// Update server time
	new NewServerTime[3];
	gettime(NewServerTime[0], NewServerTime[1], NewServerTime[2]);
	
	// Has an hour elapsed?
	if((NewServerTime[0] > ServerTime[0]) || (NewServerTime[0] == 0 && ServerTime[0] == 23)) {
		ServerTime[0] = NewServerTime[0];
		ServerTime[1] = NewServerTime[1];
		ServerTime[2] = NewServerTime[2];
		NewServerTime[0] = 0;
		NewServerTime[1] = 0;
		NewServerTime[2] = 0;
		SetWorldTime(ServerTime[0]);
		
		SetUpPayday();		
	}
	
  for(new i=0; i<MAX_PLAYERS;i++)
  {
    if(LogConCheck(i))
    {			
			MySQLSynchronizePlayer(i);
			
      if(gPlayerInfo[i][MiningTime] > 0) {
				gPlayerInfo[i][MiningTime] -= 1;
			}
			if(gPlayerInfo[i][CropDusterTime] > 0) {
				gPlayerInfo[i][CropDusterTime] -= 1;
			}
			if(gPlayerInfo[i][JailTime] > 0) {
				gPlayerInfo[i][JailTime]--;
				
				if(gPlayerInfo[i][JailTime] == 0) {
					OnPlayerSpawn(i);
					SetPlayerInterior(i, 0);
				}
			}
			if(ScrapCarTime[i] > 0) {
				ScrapCarTime[i]--;
			}
			if(RepairTime[i] > 0) {
				RepairTime[i]--;
			}
			
      if(gPlayerInfo[i][MiningTime] == 0){HasMined[i] = 0;}
			if(gPlayerInfo[i][CropDusterTime] == 0){HasDusted[i] = 0;}
			if(JobContractTime[i] > 0){JobContractTime[i] -= 1;}
      gPlayerInfo[i][ConnectedTime]++;
		}  
  }
	
	return 1;
}
Код:
public DrugTimer()
{
  for (new i = 0; i<MAX_PLAYERS; i++)
  {
    if(UsedDrugs[i] == 1)
    {
			SetPlayerWeather(i, WorldWeather);
			DestroyPickup(pill[i]);
			for (new x; x<MAX_VEHICLES;x++)
  		{
  		  SetVehicleParamsForPlayer(x,i,0,0);
  		}
  		UsedDrugs[i] = 0;
		}
	}
	
	return 1;
}
As you wish. MySQLSynchronizePlayer() is a function used to synchronize live player data with our SQL backend.

Quote:
Originally Posted by Finn
What does AdvertisementAllowed do?
AdvertisementAllowed is a global variable used to indicate whether /ad is currently allowed. We only allow advertisements every ninety seconds in our server.
Reply


Messages In This Thread
ID 0 Bugs; SERVER: Unknown Command - by samgreen - 27.02.2009, 06:43
Re: ID 0 Bugs; SERVER: Unknown Command - by Finn - 27.02.2009, 07:45
Re: ID 0 Bugs; SERVER: Unknown Command - by Frank_Tesla - 27.02.2009, 07:51
Re: ID 0 Bugs; SERVER: Unknown Command - by samgreen - 27.02.2009, 18:19
Re: ID 0 Bugs; SERVER: Unknown Command - by Frank_Tesla - 28.02.2009, 08:59
Re: ID 0 Bugs; SERVER: Unknown Command - by Finn - 28.02.2009, 11:08
Re: ID 0 Bugs; SERVER: Unknown Command - by Donny_k - 28.02.2009, 11:20
Re: ID 0 Bugs; SERVER: Unknown Command - by [M2S]moe - 28.02.2009, 14:06
Re: ID 0 Bugs; SERVER: Unknown Command - by Nubotron - 28.02.2009, 14:12
Re: ID 0 Bugs; SERVER: Unknown Command - by Donny_k - 28.02.2009, 14:26
Re: ID 0 Bugs; SERVER: Unknown Command - by [M2S]moe - 28.02.2009, 14:28
Re: ID 0 Bugs; SERVER: Unknown Command - by Donny_k - 28.02.2009, 14:49
Re: ID 0 Bugs; SERVER: Unknown Command - by [M2S]moe - 28.02.2009, 20:44
Re: ID 0 Bugs; SERVER: Unknown Command - by Nero_3D - 28.02.2009, 20:58
Re: ID 0 Bugs; SERVER: Unknown Command - by Donny_k - 28.02.2009, 22:11
Re: ID 0 Bugs; SERVER: Unknown Command - by [M2S]moe - 01.03.2009, 14:18
Re: ID 0 Bugs; SERVER: Unknown Command - by Nubotron - 01.03.2009, 17:52
Re: ID 0 Bugs; SERVER: Unknown Command - by [M2S]moe - 01.03.2009, 20:01
Re: ID 0 Bugs; SERVER: Unknown Command - by Nubotron - 01.03.2009, 20:13
Re: ID 0 Bugs; SERVER: Unknown Command - by samgreen - 02.03.2009, 01:05
Re: ID 0 Bugs; SERVER: Unknown Command - by Damon_Black - 02.03.2009, 01:18
Re: ID 0 Bugs; SERVER: Unknown Command - by samgreen - 02.03.2009, 01:22
Re: ID 0 Bugs; SERVER: Unknown Command - by Donny_k - 02.03.2009, 09:45
Re: ID 0 Bugs; SERVER: Unknown Command - by [M2S]moe - 02.03.2009, 12:38
Re: ID 0 Bugs; SERVER: Unknown Command - by Nero_3D - 02.03.2009, 12:55
Re: ID 0 Bugs; SERVER: Unknown Command - by 90NINE - 02.03.2009, 12:58
Re: ID 0 Bugs; SERVER: Unknown Command - by Nubotron - 02.03.2009, 13:14
Re: ID 0 Bugs; SERVER: Unknown Command - by Donny_k - 02.03.2009, 14:41
Re: ID 0 Bugs; SERVER: Unknown Command - by MonkeyWrench - 08.03.2009, 10:06

Forum Jump:


Users browsing this thread: 2 Guest(s)