02.03.2009, 01:05
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.
As you wish. MySQLSynchronizePlayer() is a function used to synchronize live player data with our SQL backend.
AdvertisementAllowed is a global variable used to indicate whether /ad is currently allowed. We only allow advertisements every ninety seconds in our server.
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;
}
Quote:
|
Originally Posted by Finn
What does AdvertisementAllowed do?
|

