Issue with IsPlayerConnected and GetPlayerID
#3

In other words you want to show the name of the offline players for that faction and skip the connected?

First of all, returning a value in a loop breaks it completely. Store the rows to a variable instead of keep calling cache_get_row_count in every iteration.

I don't get why you are trying to send the rowid as a client message and not the name of the player.

Use sscanf to check if a player is connected than GetPlayerID + IsPlayerConnected functions, much faster. If you insist on using your way, at least use GetPlayerPoolSize or even better foreach/y_iterate for the player-loops.

Last, if you want only to retrieve the name then don't select all the data in the query but this certain column:
"SELECT Username FROM ..."
Reply


Messages In This Thread
Issue with IsPlayerConnected and GetPlayerID - by justjamie - 09.11.2016, 11:04
Re: Issue with IsPlayerConnected and GetPlayerID - by Lloyde - 09.11.2016, 12:28
Re: Issue with IsPlayerConnected and GetPlayerID - by Konstantinos - 09.11.2016, 12:39

Forum Jump:


Users browsing this thread: 1 Guest(s)