[Ajuda] Quero Passar esse FS para meu GM
#1

bom eu n consigui passa esse FS para meu GM alguem pode me Ajudar ?
codigo
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
*/
Reply
#2

No topo de seu GM

Код:
new
    pDrunkLevelLast[MAX_PLAYERS],
    PlayerText3D:playertextid,
    pFPS[MAX_PLAYERS]
;

forward Atualizar(playerid);
Na 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);
Fim do seu GM

Код:
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;
}
Na public OnPlayerConnect(playerid)

Код:
    pDrunkLevelLast[playerid] = 0;
    pFPS[playerid] = 0;
e na public OnPlayerDisconnect(playerid, reason)

Код:
    pDrunkLevelLast[playerid] = 0;
    pFPS[playerid] = 0;
Reply
#3

Sу pegar as coisas que estiver nas publics ai e colocar na sua jб й
Reply
#4

ae vlw deu certim
Reply
#5

Quote:
Originally Posted by MarcosRodrigo
Посмотреть сообщение
ae vlw deu certim
Nada!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)