Is it existing?
#1

Any function maybe like GetPlayerIngamePlayers() ??, or i should make it by myself?
Reply
#2

GetPlayerIngamePlayers could be anything, the naming isn't specific at all. It could return: a string of names of connected players, connected player count, an array of player IDs connected. What are you actually trying to do?
Reply
#3

what u're trying to make with this function? what do u want to exactly do?
Reply
#4

You want to get the number of players online?isnt that shown when pressing TAB or simply from samp client?explaon better
Reply
#5

Well, let's suppose you want to get the number of players online in your server:
PHP код:
stock GetOnlinePlayersNumber()
{
     new 
res=0;
     for(new 
j=0;j<MAX_PLAYERS;j++) if(IsPlayerConnected(j))res++; else continue;
     return 
res;
}
//Somewhere in your code...
new str[256];
format(str,sizeof str,"We have %d/50 players online",GetOnlinePlayersNumber());
SendClientMessage(playerid,-1,str); 
Reply
#6

https://sampwiki.blast.hk/wiki/GetPlayerPoolSize
Reply
#7

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
yeah this will be better for optimize and reduce lags (not noticeable, but it really reduces )
Reply
#8

Quote:
Originally Posted by Mugala
Посмотреть сообщение
yeah this will be better for optimize and reduce lags (not noticeable, but it really reduces )
Never re-write a native function if you don't change something. Pawn function are always slower than native. GetPlayerPoolSize(); will be always faster than yours. There is no point to write an alias pawn function.
Reply
#9

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Never re-write a native function if you don't change something. Pawn function are always slower than native. GetPlayerPoolSize(); will be always faster than yours. There is no point to write an alias pawn function.
yeah, that's what I exactly said dude.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)