08.10.2011, 04:26
Titulo:
Info Player [3D Text] - Ping, FPS e IP (Admin RCON)
Descriзao:
Simples sistema de mostrar o ping, FPS do player encima da cabeзa dele. Se o jogador for admin rcon podera ver o ip dos jogadores.
Imagens:
Download:
Creditos:
Shickcard - Criar o sistema
JernejL - Getar FPS
Espero que desfrutem =).
Info Player [3D Text] - Ping, FPS e IP (Admin RCON)
Descriзao:
Simples sistema de mostrar o ping, FPS do player encima da cabeзa dele. Se o jogador for admin rcon podera ver o ip dos jogadores.
Imagens:
Download:
pawn Код:
/*
CREDITOS DO SISTEMA A:
Shickcard & JernejL (Getar FPS)
TOPICO FPS - https://sampforum.blast.hk/showthread.php?tid=172085
*/
#include <a_samp>
new
pDrunkLevelLast[MAX_PLAYERS],
PlayerText3D:playertextid,
pFPS[MAX_PLAYERS]
;
forward Atualizar(playerid);
public OnFilterScriptInit()
{
print(".:: Info Player ::.\n");
print(".:: Created By.: Shickcard\n");
return 1;
}
public OnPlayerUpdate(playerid)
{
new drunknew = GetPlayerDrunkLevel(playerid);
if(drunknew < 100) return SetPlayerDrunkLevel(playerid, 2000);
else
{
if (pDrunkLevelLast[playerid] != drunknew)
{
new wfps = pDrunkLevelLast[playerid] - drunknew;
if ((wfps > 0) && (wfps < 200)) pFPS[playerid] = wfps;
pDrunkLevelLast[playerid] = drunknew;
}
}
SetTimerEx("Atualizar", 101, 1, "i", playerid);
return 1;
}
public Atualizar(playerid)
{
for(new i; i < sizeof(playertextid); i++) DeletePlayer3DTextLabel(playerid, playertextid);
new
Float:P[3],
sStr[100],
IP[15]
;
if(IsPlayerAdmin(playerid))
{
GetPlayerPos(playerid, P[0], P[1], P[2]);
GetPlayerIp(playerid, IP, sizeof(IP));
format(sStr, sizeof(sStr), "Ping: {9B30FF}%i\n{F09C00}IP: {9B30FF}%s\n{F09C00}FPS: {9B30FF}%i", GetPlayerPing(playerid), IP, pFPS[playerid]);
playertextid = CreatePlayer3DTextLabel(playerid, sStr, 0xF09C00AA, P[0], P[1], P[2]+1.0, 10.0);
UpdatePlayer3DTextLabelText(playerid, playertextid, 0xF09C00AA, sStr);
}
else
{
GetPlayerPos(playerid, P[0], P[1], P[2]);
format(sStr, sizeof(sStr), "Ping: {9B30FF}%i\n{F09C00}FPS: {9B30FF}%i", GetPlayerPing(playerid), pFPS[playerid]);
playertextid = CreatePlayer3DTextLabel(playerid, sStr, 0xF09C00AA, P[0], P[1], P[2]+1.0, 10.0);
UpdatePlayer3DTextLabelText(playerid, playertextid, 0xF09C00AA, sStr);
}
return 1;
}
public OnPlayerConnect(playerid)
{
pDrunkLevelLast[playerid] = 0;
pFPS[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
pDrunkLevelLast[playerid] = 0;
pFPS[playerid] = 0;
return 1;
}
/*
CREDITOS DO SISTEMA A:
Shickcard & JernejL (Getar FPS)
TOPICO FPS - https://sampforum.blast.hk/showthread.php?tid=172085
*/
Shickcard - Criar o sistema
JernejL - Getar FPS
Espero que desfrutem =).