[FilterScript] 3D Info
#1

Since 0.3b R2 I'm scripted this thing. Rcon-admin can see important info about players with 3d-labels. Other data simple adding...



Download:
http://pastebin.com/ie8srvyA

v1.1
* 1 3D-text;
* 1 format's variable.

pawn Код:
#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;
}
Reply


Messages In This Thread
3D Info - by OKStyle - 12.10.2011, 10:02
Re: 3D Info - by HyperZ - 12.10.2011, 10:06
Re: 3D Info - by [MWR]Blood - 12.10.2011, 10:12
Re: 3D Info - by Dripac - 12.10.2011, 10:22
Re: 3D Info - by OKStyle - 12.10.2011, 10:47
Re: 3D Info - by Hiddos - 12.10.2011, 13:22
Re: 3D Info - by wups - 12.10.2011, 13:23
Re: 3D Info - by [L3th4l] - 12.10.2011, 14:47
Re : 3D Info - by TheBest6 - 12.10.2011, 15:49
Re: 3D Info - by OKStyle - 12.10.2011, 16:51

Forum Jump:


Users browsing this thread: 2 Guest(s)