16.04.2011, 23:53
Quote:
I tried this and it shows the FPS 2000 and it keeps changing to 0 every second like before. Do I have to use something else instead of OnPlayerUpdate?
|
![Shocked](images/smilies/surprised.gif)
pawn Код:
stock GetPlayerFPS(playerid)
{ // forum.sa-mp.com/showpost.php?p=1167812&postcount=7
new
drunk = GetPlayerDrunkLevel(playerid);
if(GetPVarInt(playerid, "DrunkLevel") != drunk) {
SetPVarInt(playerid, "FPS", (GetPVarInt(playerid, "DrunkLevel") - drunk));
}
if(drunk < 100) {
SetPlayerDrunkLevel(playerid, 2000);
SetPVarInt(playerid, "DrunkLevel", 2000);
} else {
SetPVarInt(playerid, "DrunkLevel", drunk);
}
return GetPVarInt(playerid, "FPS");
}