16
AdrenalineX Development / Re: AdrenalineX Low FPS Detected [LFD]
« on: May 21, 2015, 08:00:21 am »bug abuse will count when player will play at below then 30 FPS.
I have new solution:
Code: [Select]
new WarningCount[MAX_PLAYERS];
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(PlayerFps[playerid] < 30 && WarningCount[playerid] < 3) // check if player's fps is under 30 & player's warning is not == 3 then
{
WarningCount[playerid]++; // count warning
}
if(PlayerProgress[playerid] == gMaxRaceCheckpoints-2 && WarningCount[playerid] < 3) // if player is last 2nd checkpoint & his warning is below then 3 then
{
if(PlayerFps[playerid] > 30) // if player fps is over than 30 then
{
AddRecord[playerid] = true; // record making activated variable true/1
}
}
else AddRecord[playerid] = false // record making deactivated variable false/0
}
public OnPlayerDisconnect(playerid, reason)
{
WarningCount[playerid] = 0;
}
I think that code will be the best for all players (low/high pingers)