Posts: 410
Threads: 9
Joined: Jan 2006
Reputation:
0
No it doesn't. It's just checking if a variable is equal to INVALID_PLAYER_ID (a number), which is never connected because a player can never have that ID.
It does not mean a valid player ID is connected if it passes the check.
How it's interpreted or supposed to be interpreted is up to the function that provides it.
Posts: 1,494
Threads: 120
Joined: Dec 2009
Reputation:
0
Well yeah, I just seen that piece a lot and I never found out what it meant. Does anyone know what it means?
Posts: 410
Threads: 9
Joined: Jan 2006
Reputation:
0
It depends on the context it's used.
It's a number that is supposed to represent a player ID that players cannot have. This is why it's used in callbacks such as OnPlayerDeath, you know that there is no killer if the killerid is INVALID_PLAYER_ID because the SA:MP server is designed to do that so it's predictable. It's done like that so you know there's no killer associated with the event and it wouldn't get confused with all valid playerid's.
The meaning of a check like that can change from function to function.