Posts: 104
Threads: 28
Joined: Jul 2013
Is usefull to use that function (IsPlayerConnected) inside a cmd? I don't find his role. If I type a command, it's pretty logic that I'm online, no?
Posts: 104
Threads: 28
Joined: Jul 2013
But why this function is used in all GM's inside the commands?
Posts: 36
Threads: 8
Joined: Dec 2014
Reputation:
0
I suggest you to use INVALID_PLAYER_ID if you want to check if someone is online. (like if you want to give him admin, you can't give an admin to offline player, right?)
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
It is really an artifact from the days of 0.1b (yes, that old) where, due to a bug, players that were kicked or banned could still execute commands. To this day people are still copying those old commands (mostly Godfather edits) without even the slightest thought to what they're doing or even whether there might be a better version available. I still regularly see "PlayerToPoint" to this day even though IsPlayerInRangeOfPoint was implemented as a native in 0.3a.