03.08.2016, 12:28
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; }