Posts: 159
Threads: 103
Joined: Apr 2017
Reputation:
0
Hi,
I need to do checks like that
if( playerid == -1 ) ?
or this never hapin?
Posts: 824
Threads: 6
Joined: Sep 2012
Reputation:
0
OnPlayerConnect is called when (obviously) a player connects. It's impossible for a playerid to be -1.
What're you trying to check?
Posts: 159
Threads: 103
Joined: Apr 2017
Reputation:
0
Maybe there is hacks, that could
Posts: 824
Threads: 6
Joined: Sep 2012
Reputation:
0
No. How would that even work? A playerid can't be below 0.
Posts: 294
Threads: 12
Joined: Sep 2015
Reputation:
0
You should check INVALID_PLAYER_ID not -1.
Posts: 159
Threads: 103
Joined: Apr 2017
Reputation:
0
So when onplayerconnected is called IsPlayerConnected have always be true?
Posts: 457
Threads: 7
Joined: Jul 2017
Quote:
Originally Posted by Bussyman
So when onplayerconnected is called IsPlayerConnected have always be true?
|
Yes, excalty.
but you should know that OnPlayerConnect isnt the first callback that get called when a player trying to connect
https://sampwiki.blast.hk/wiki/OnIncomingConnection is the first callback.
Posts: 159
Threads: 103
Joined: Apr 2017
Reputation:
0
And is possible that when onplayerconnect player instantly disconnect onplayerrequestclass still get called or no?