29.01.2017, 08:11
well is it really not important to check something..onplayerdisconnect
like if 1 player disconnect and then another player join with same playerid his data will be transferred to him...
correct me if i'm wrong..
BTW I don't have to create Cache_ID in database right?
like if 1 player disconnect and then another player join with same playerid his data will be transferred to him...
correct me if i'm wrong..
PHP код:
public OnPlayerDisconnect(playerid, reason)
{
MySQLRaceCheck[playerid]++;
PlayerAccountUpdate(playerid, reason);
if(cache_is_valid(PINFO[playerid][Cache_ID]))
{
cache_delete(PINFO[playerid][Cache_ID]);
PINFO[playerid][Cache_ID] = MYSQL_INVALID_CACHE;
}
if (PINFO[playerid][LoginTimer])
{
KillTimer(PINFO[playerid][LoginTimer]);
PINFO[playerid][LoginTimer] = 0;
}
PINFO[playerid][Plogged] = false;
return 1;
}