MySQL help making a function in game.
#1

I'm made a dynamic vehicle system and each vehicle has a Type.
Type 1 = RENT_VEHICLE

I need a function in game that checks if the player is inside a rented vehicle which has Type = 1



I've tried something like this but it does not work:

EDIT: Nevermind I made it

pawn Код:
public IsARenting(vehicle)
{
    new bool:found = false;
    for(new i = 0; i < sizeof(VehicleInfo); i++)
    {
        if(VehicleInfo[i][vCarOn] && VehicleInfo[i][vType] == RENT_VEHICLE && vehicle == VehicleInfo[i][vVehicle])
        {
            found = true;
            break;
        }
    }
    return found;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)