SA-MP Forums Archive
Mni Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mni Help (/showthread.php?tid=604426)



Mni Help - Zorono - 04.04.2016

<removed>


Re: Mni Help - DTV - 04.04.2016

pawn Код:
new Text:pcounter;
#define MAX_P 100

public OnGameModeInit()
{
new string[32];
format(string,sizeof(string),"%i/%i",OnlinePlayers(),MAX_P);
pcounter = TextDrawCreate(309.000000, 9.000000, string);
TextDrawAlignment(pcounter, 2);
TextDrawBackgroundColor(pcounter, 255);
TextDrawFont(pcounter, 1);
TextDrawLetterSize(pcounter, 0.500000, 1.500000);
TextDrawColor(pcounter, -1);
TextDrawSetOutline(pcounter, 1);
TextDrawSetProportional(pcounter, 1);
return 1;
}

public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, pcounter);
return 1;
}

OnlinePlayers()
{
    counter = 0;
    for (new i = 0; i != MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
            ++counter;
    }

    return counter;
}



Re: Mni Help - Zorono - 04.04.2016

Thanks for your help
i will test it