Check if player is online by mysql id?
#5

Thanks. I'd like to make it a stock though as I'll be using it elsewhere as well. I tried, but apparently it's an unreachable code. I assume it has to do with the return, but don't get why. No matter where I place it, I get that error.

Код:
stock GetIDbyVDID(vehicleid)
{
	for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
    {
        if (PlayerInfo[i][pDatabaseID] == VehicleInfo[vehicleid][carOwner])
        {
            // Send message to inform player - "i" holds their in-game ID.
            printf("Returning %d", i);
            break; // stop the loop, result was found
            return i;
        }
    }
    return INVALID_PLAYER_ID;
}
Reply


Messages In This Thread
Check if player is online by mysql id? - by TheBigFive - 03.08.2016, 11:19
Re: Check if player is online by mysql id? - by Konstantinos - 03.08.2016, 11:28
Re: Check if player is online by mysql id? - by TheBigFive - 03.08.2016, 11:29
Re: Check if player is online by mysql id? - by Konstantinos - 03.08.2016, 11:34
Re: Check if player is online by mysql id? - by TheBigFive - 03.08.2016, 12:28
Re: Check if player is online by mysql id? - by Konstantinos - 03.08.2016, 12:44

Forum Jump:


Users browsing this thread: 1 Guest(s)