[ajuda] textdraw
#5

Quote:
Originally Posted by DarkScripter
Посмотреть сообщение
Odeio POG ( Programaзгo Orientada a Gambiarra)
por isto eu reformulei o script, tornando mais rбpido e eficiente.

pawn Код:
#include <a_samp>

new Text:PlayersOnServer;

public OnFilterScriptInit()
{
    print("\n------------------------------------------------------------------");
    print("  Show Players who are online by Adsy fixed by: DarkScripter");
    print("------------------------------------------------------------------\n");
   
    PlayersOnServer = TextDrawCreate(30,326, #);
    TextDrawUseBox(PlayersOnServer,0);
    TextDrawColor(PlayersOnServer,0xFF7100FF);
    TextDrawBackgroundColor(PlayersOnServer,0x000000AA);
    TextDrawAlignment(PlayersOnServer, 1);
    TextDrawSetOutline(PlayersOnServer,1);
    TextDrawSetShadow(PlayersOnServer,0);
    return 1;
}

public OnFilterScriptExit()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        TextDrawHideForPlayer(i, PlayersOnServer);
    }
    TextDrawDestroy(PlayersOnServer);
    return 1;
}

public OnPlayerConnect(playerid)
{
    return f_OnPlayerConnect(playerid);
}


forward f_OnPlayerConnect(p);
public f_OnPlayerConnect(p)
{
    new conected = 0, string[15];
    for(new i, e = GetMaxPlayers(); i != e; ++i)
    {
        conected += IsPlayerConnected(i);
    }
    format(string, sizeof(string), "%i/%i PLAYERS", conected, GetMaxPlayers());
    TextDrawSetString(PlayersOnServer, string);
    TextDrawShowForAll(PlayersOnServer);
    return 1;
}
Valeu cara funcionou!!! +REP
Reply


Messages In This Thread
[ajuda] textdraw - by aleex995 - 29.02.2012, 00:15
Re: [ajuda] textdraw - by Hardware - 29.02.2012, 00:55
Re: [ajuda] textdraw - by aleex995 - 29.02.2012, 02:01
Re: [ajuda] textdraw - by DarkScripter - 29.02.2012, 02:24
Re: [ajuda] textdraw - by aleex995 - 29.02.2012, 03:26

Forum Jump:


Users browsing this thread: 1 Guest(s)