16.11.2016, 00:16
Hey,
I have a weird problem with IsPlayerConnected, everytime a playerid crashes from the server that ID becomes unusable. It keeps saying invalid player ID, I have a solution for it but I don't know if it's the right way or if it has consequences to it.
This is what I have originally
Tried this, doesn't work either.
It only worked when I changed the sscanf from this:
I know that "u" is for player ID's but it doesn't work properly for me. My question is, is there another solution or can I keep doing that without any problems or consequences?
I have a weird problem with IsPlayerConnected, everytime a playerid crashes from the server that ID becomes unusable. It keeps saying invalid player ID, I have a solution for it but I don't know if it's the right way or if it has consequences to it.
This is what I have originally
Код:
if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid, COLOR_ORANGE, "** {AFAFAF}Invalid player ID.");
Код:
if(playerb == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ORANGE, "** {AFAFAF}Invalid player ID.");
Код:
if(sscanf(params, "u", playerb)) //To if(sscanf(params, "i", playerb))