Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include a_samp
- new Text:pcounter;
- #define MAX_P 100
- public OnFilterScriptInit()
- {
- 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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement