public OnPlayerEnterVehicle(playerid, vehicleid){ for( new i; i < MAX_VEHICLES; i++) { if(vehicleid == i) { Your code } } return 1;}