12.10.2011, 10:11
(
Last edited by OKStyle; 13/10/2011 at 07:42 AM.
)
Ещё с версии 0.3b R2 я начал работу над этим скриптом и только сегодня пришла в голову отличная мысль и мне удалось его закончить в том виде, в котором он и планировался.

Данный скрипт позволяет rcon-админу видеть данные игрока через 3д-текст. Особенно красиво через спектакор.
Новые данные, которые могут понадобиться (здоровье тачки, оружие, ид или модель тачки) легко добавляются через редактирование скрипта.
Скачать:
http://pastebin.com/ie8srvyA
v1.1
* 1 3д-текст;
* 1 переменная для форматирования.

Данный скрипт позволяет rcon-админу видеть данные игрока через 3д-текст. Особенно красиво через спектакор.
Новые данные, которые могут понадобиться (здоровье тачки, оружие, ид или модель тачки) легко добавляются через редактирование скрипта.
Скачать:
http://pastebin.com/ie8srvyA
v1.1
* 1 3д-текст;
* 1 переменная для форматирования.
pawn Code:
#include <a_samp>
// 3D Info 1.1 by O.K.Style™
new PlayerText3D:Info[MAX_PLAYERS];
public OnPlayerStreamIn(playerid, forplayerid)
{
if(!IsPlayerAdmin(forplayerid)) return 1;
if(IsPlayerAdmin(playerid)) return 1;
if(IsPlayerNPC(playerid)) return 1;
Info[playerid] = CreatePlayer3DTextLabel(forplayerid, "Health: 0.0\nArmour: 0.0\nPing: 0\nFPS: 0\nMoney: 0", -1, 0.0, 0.0, 0.35, 30.0, playerid, INVALID_VEHICLE_ID, 0);
return 1;
}
public OnPlayerUpdate(playerid)
{
new Float:HP,Float:AP;
GetPlayerHealth(playerid, HP);
GetPlayerArmour(playerid, AP);
new string_3D[256];
format(string_3D, sizeof(string_3D), "{FFFFFF}Health: {FDE39D}%.0f\n{FFFFFF}Armour: {FDE39D}%.0f\n{FFFFFF}Ping: {FDE39D}%d\n{FFFFFF}FPS: {FDE39D}%d\n{FFFFFF}Money: {FDE39D}%d", HP, AP, GetPlayerPing(playerid), GetPlayerFPS(playerid), GetPlayerMoney(playerid));
for(new i, j = GetMaxPlayers(); i != j; i++)
{
if(!IsPlayerConnected(i)) continue;
if(IsPlayerNPC(i)) continue;
if(!IsPlayerAdmin(i)) continue;
if(IsPlayerAdmin(playerid)) continue;
UpdatePlayer3DTextLabelText(i, Info[playerid], -1, string_3D);
}
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
if(IsPlayerNPC(playerid)) return 1;
if(!IsPlayerAdmin(forplayerid)) return 1;
if(IsPlayerAdmin(playerid)) return 1;
for(new i; i < 6; i++) DeletePlayer3DTextLabel(forplayerid, Info[playerid]);
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;
}