11.04.2012, 18:53
(
Последний раз редактировалось CidadeNovaRP; 11.04.2012 в 19:24.
)
Ta ae :
pawn Код:
#include <a_samp>
new Text:FPS[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
FPS[playerid] = TextDrawCreate(240.0, 580.0, "FPS: Carregando");
TextDrawShowForPlayer(playerid, FPS[playerid]);
return 1;
}
public OnPlayerUpdate(playerid)
{
new string[128];
format(string, sizeof(string), "Your FPS: %d", GetPlayerFPS(playerid));
TextDrawSetString(FPS[playerid], string);
return 1;
}
stock GetPlayerFPS(playerid)
{
SetPVarInt(playerid, "DrunkL", GetPlayerDrunkLevel(playerid));
if(GetPVarInt(playerid, "DrunkL") < 100)
{
SetPlayerDrunkLevel(playerid, 2000);
}
else
{
if(GetPVarInt(playerid, "LDrunkL") != GetPVarInt(playerid, "DrunkL"))
{
SetPVarInt(playerid, "FPS", (GetPVarInt(playerid, "LDrunkL") - GetPVarInt(playerid, "DrunkL")));
SetPVarInt(playerid, "LDrunkL", GetPVarInt(playerid, "DrunkL"));
if((GetPVarInt(playerid, "FPS") > 0) && (GetPVarInt(playerid, "FPS") < 256))
{
return GetPVarInt(playerid, "FPS") - 1;
}
}
}
return 0;
}